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>
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>
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>
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>
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>
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>
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>
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>