Qt.locale().amText property does not work for English (Australia) locale

Bug #1384739 reported by Daniel van Vugt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Clock App
Won't Fix
Low
Bartosz Kosiorek

Bug Description

Issue
=====

Digital time display is wider than the circle it's drawn on.

At a guess, the font size is correct for a slightly higher resolution. But on krillin at least the digital time display is bigger than the inner circle. This looks particularly inelegant when animating between digital and analog modes.

Screenshot: https://bugs.launchpad.net/qtubuntu/+bug/1384739/+attachment/4242418/+files/clock_screenshot.png

Reasoning
=========

Ubuntu Clock App identifies the AM/PM text of the user locale using Qt.locale().amText/ Qt.locale().pmText property [1]. It seems this identification fails for the English(Australia) locale.

Rather than patching this in the ubuntu clock app, it would be best to fix it in QtUbuntu and then even upstream it if possible.

[1] http://qt-project.org/doc/qt-5/qml-qtqml-locale.html#amText-prop

Related branches

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

I don't have krillin and run all my tests on mako. Can you please post a screenshot of the bug?

Changed in ubuntu-clock-app:
status: New → Incomplete
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Screenshot attached.

Changed in ubuntu-clock-app:
status: Incomplete → New
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Hmm that's really strange considering that it should move the am/pm text to the next line with a smaller font size. What locale do you use? I use Qt.locale().amText and Qt.locale().pmText explicitly to do detect that and move it to the next line.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Aha. Yes the locale is the problem: English (Australia)

Changing to United States avoids the bug.

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

To be honest I am not sure, how to fix this issue since I am using upstream Qt.locale() properties [1] to show the time format correctly. If by using English (Australia), the value returned by Qt.locale().amText or Qt.locale().pmText is incorrect, then it is an upstream bug.

Any suggestions on how I can proceed?

[1] http://qt-project.org/doc/qt-5/qml-qtqml-locale.html#amText-prop

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sure, just name the Ubuntu package name of the relevant upstream and I can assign it.

Changed in ubuntu-clock-app:
status: New → Confirmed
Changed in ubuntu-clock-app:
importance: Undecided → Medium
status: Confirmed → Triaged
summary: - [krillin] Digital time display is wider than the circle it's drawn on
+ [krillin] Digital time display is wider than the circle it's drawn on,
+ for English (Australia) locale
Revision history for this message
Bartosz Kosiorek (gang65) wrote : Re: [krillin] Digital time display is wider than the circle it's drawn on, for English (Australia) locale

This bug will be resolved during total migration to QDateTime.

Changed in ubuntu-clock-app:
status: Triaged → In Progress
assignee: nobody → Bartosz Kosiorek (gang65)
Changed in ubuntu-clock-app:
milestone: none → 3.6
Changed in ubuntu-clock-app:
milestone: 3.6 → 3.7
milestone: 3.7 → 3.6
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

Fix committed into lp:ubuntu-clock-app at revision None, scheduled for release in ubuntu-clock-app, milestone 3.6

Changed in ubuntu-clock-app:
status: In Progress → Fix Committed
summary: - [krillin] Digital time display is wider than the circle it's drawn on,
- for English (Australia) locale
+ Digital time display is wider than the circle it's drawn on, for English
+ (Australia) locale
Changed in ubuntu-clock-app:
status: Fix Committed → Triaged
milestone: 3.6 → 3.7
description: updated
Changed in ubuntu-clock-app:
status: Triaged → In Progress
milestone: 3.7 → 3.6
Changed in ubuntu-clock-app:
importance: Medium → Low
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote : Re: Digital time display is wider than the circle it's drawn on, for English (Australia) locale

It would be better if the fix for this issue came from QtUbuntu [1] rather than patching it in the clock app. Downstream QT Patches are done in QtUbuntu (and upstream after a while). Can you talk to Timo Jyrinki who usually does this? You can find him in #ubuntu-app-devel, #ubuntu-touch etc under the nickname Mirv.

Let's not add these kind of patches in clock app due to upstream issues *unless* it is a High/Critical issue that affects a large portion of users. Instead we should convince upstream to fix these issues.

Testing is just one aspect of it. It just adds the headache of maintaining that patch ourselves once we add it.

[1] https://launchpad.net/qtubuntu

Changed in ubuntu-clock-app:
status: In Progress → Won't Fix
description: updated
summary: - Digital time display is wider than the circle it's drawn on, for English
- (Australia) locale
+ Qt.locale().amText property does not work for English (Australia) locale
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

On talking to Mirv, it seems the best way would be to report this to upstream QT Bug trackers and also keep this LP bug so that we can backport a fix as soon as upstream has a fix in their dev branch. The backported fix will be patched in our stable Qt 5.4.1 OTA updates.

no longer affects: qtubuntu
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.