Review Request 127102: Use fixed width for digital clock applet
Daniel Faust
hessijames at mailbox.org
Wed Mar 16 15:56:53 GMT 2016
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127102/
-----------------------------------------------------------
(Updated March 16, 2016, 3:56 p.m.)
Status
------
This change has been marked as submitted.
Review request for kde-workspace and Plasma.
Changes
-------
Submitted with commit e7f09ba1eb976c4f282145016d34fe87de515a25 by Daniel Faust to branch master.
Bugs: 347724
https://bugs.kde.org/show_bug.cgi?id=347724
Repository: plasma-workspace
Description
-------
Currently the width of the date label is not fixed but changes depending on the text. This causes the entire applet to change its width (if the time is the widest displayed item). This in turn can cause all other applets in the same panel to move whenever the displayed time changes.
This patch uses FontMetrics to iterate over all possible time strings (with different width) and chooses the widest of them as reference for the fixed width of the time label.
This way the width of the applet stays the same (unless the date is displayed and changes). The text remains centered though, which means that it can still move within the applet when the time changes.
Diffs
-----
applets/digital-clock/package/contents/ui/DigitalClock.qml 95bb071
Diff: https://git.reviewboard.kde.org/r/127102/diff/
Testing
-------
Works with horizontal and vertical panel.
Also displaying different combinations of "seconds", "date" and "timezone" works.
File Attachments
----------------
0001-Use-fixed-width-for-digital-clock-applet.patch
https://git.reviewboard.kde.org/media/uploaded/files/2016/03/16/81b4a902-1454-4155-9fda-552b8acba1a8__0001-Use-fixed-width-for-digital-clock-applet.patch
Thanks,
Daniel Faust
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20160316/d2df238b/attachment.htm>
More information about the kde-core-devel
mailing list