2020-07-02 15:14:31 +00:00
|
|
|
pragma Singleton
|
|
|
|
|
|
|
|
import QtQuick 2.13
|
|
|
|
import "./Themes"
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
property Theme current: lightTheme
|
2020-07-01 17:35:57 +00:00
|
|
|
property Theme lightTheme: LightTheme {}
|
|
|
|
property Theme darkTheme: DarkTheme {}
|
|
|
|
|
|
|
|
property var changeTheme: function (theme) {
|
|
|
|
switch (theme) {
|
|
|
|
case "light": current = lightTheme; break;
|
|
|
|
case "dark": current = darkTheme; break;
|
|
|
|
default: current = lightTheme; console.log('Unknown theme. Valid themes are "light" and "dark"')
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2020-11-25 10:46:18 +00:00
|
|
|
|
|
|
|
property var changeFontSize: function (fontSize) {
|
|
|
|
current.updateFontSize(fontSize)
|
|
|
|
}
|
2020-07-02 15:14:31 +00:00
|
|
|
}
|