Bug 335147 - Clock should use Text::fontSizeMode
Summary: Clock should use Text::fontSizeMode
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Digital Clock (show other bugs)
Version: master
Platform: unspecified Linux
: NOR normal
Target Milestone: 1.0
Assignee: Martin Klapetek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-21 16:41 UTC by David Edmundson
Modified: 2014-05-23 15:24 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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