aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/themeinterface.cpp
AgeCommit message (Collapse)Author
2020-02-09mobile UI: fix font size breakage on AndroidGravatar Dirk Hohndel
The pointSize() of a font can return -1 if the font was originally specificied with a pixelSize. Work around this by using QFontInfo to calculate the correct value. Additionally, don't use the pointSize() of a font when we can instead use the calculated size. This fixes the problem with the missing star ratings on Android. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-03mobile-widgets: switch to new subsurfaceThemeGravatar jan Iversen
Remove subsurfaceTheme from main.qml Replace ThemeNew -> subsurfaceTheme change registration ThemeNew -> subsurfaceTheme Signed-off-by: jan Iversen <jan@casacondor.com>
2020-02-03mobile-widgets/themeinterface: make most part staticGravatar jan Iversen
Make variables and functions static where possible, this is done to prevent different versions of theme with different values. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-30mobile-widgets: emit signals for each colorGravatar jan Iversen
Emit signals for each standard color when theme changes. The iconStyle property was changed from being a constant, because it can change, and thus a signal was added. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-30mobile-widgets: correct empty linesGravatar jan Iversen
Remove extra empty lines in themeinterface.cpp just a cleanup, no functionality change. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-30mobile-widgets: move font property to themeInterfaceGravatar jan Iversen
Move setting of font properties used throughout to themeInterface. Add new settings "currentScale". The properties are kept in main (subsurfaceTheme) in order not to do a big search/replace. Update settings to use currectScale and signal changes in themeinterface. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-30mobile-widgets: move basePointSize to themeinterfaceGravatar jan Iversen
Check defaultfont and calculate basepointsize in themeinterface instead of in QML. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-28themeinterface: move registration to themeinterfaceGravatar jan Iversen
Move setup call and registration from subsurface-helper to themeInterface, in order to keep the registration where the code are. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-26mobile-widgets: add themeInterfaceGravatar jan Iversen
Currently subsurfaceTheme resides in main.qml, where it does not naturally belong. Add C++ class that will replace subsurfaceTheme in main.qml in a 1-1 manner. This opens future posibilities - on top of the 3 themes, allow users to select colors/fonts - add stylesheets to Template* components - make day/night shift automatically. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>