Bug 335147

Summary: Clock should use Text::fontSizeMode
Product: [Plasma] plasmashell Reporter: David Edmundson <kde>
Component: Digital ClockAssignee: Martin Klapetek <mklapetek>
Status: RESOLVED FIXED    
Severity: normal CC: kde
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description David Edmundson 2014-05-21 16:41:08 UTC
http://qt-project.org/doc/qt-5/qml-qtquick-text.html#fontSizeMode-prop

and replace all the current nonsense to work out the font size.
Comment 1 Martin Klapetek 2014-05-21 16:44:36 UTC
What nonsense in particular are you referring to?
Comment 2 David Edmundson 2014-05-21 16:46:06 UTC
sizehelper and geotimer
Comment 3 Martin Klapetek 2014-05-21 18:27:58 UTC
I think the sizehelper would still be needed though as you need to actually somehow get the width/height first in order to use the sizeMode. Height you can get from the panel height but you also need constant width otherwise the plasmoid size will jump when time changes, making your whole panel contents move all the time.

How would you suggest the width is computed then?
Comment 4 David Edmundson 2014-05-22 10:24:44 UTC
I think you're right: sizehelper is needed.
but death to geotimer !

maybe?
Comment 5 Martin Klapetek 2014-05-22 10:28:12 UTC
Alright, I'll see what I can do.
Comment 6 Martin Klapetek 2014-05-23 15:24:00 UTC
Git commit 3fec017438b72d96028dd1eb33beb838ec047a11 by Martin Klapetek.
Committed on 23/05/2014 at 15:23.
Pushed by mklapetek into branch 'master'.

[digital-clock] Replace sizing timer with fontSizeMode property

QML offers a fontSizeMode setting that scales font to the available
size. This replaces the sizing timer we had in clock with that property.

REVIEW: 118274

M  +17   -34   applets/digital-clock/package/contents/ui/DigitalClock.qml

http://commits.kde.org/plasma-workspace/3fec017438b72d96028dd1eb33beb838ec047a11