mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-10 22:36:24 +00:00
8b74141b99
Closes #737
24 lines
609 B
QML
24 lines
609 B
QML
pragma Singleton
|
|
|
|
import QtQuick 2.13
|
|
import "./Themes"
|
|
|
|
QtObject {
|
|
property Theme current: lightTheme
|
|
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"')
|
|
}
|
|
|
|
}
|
|
|
|
property var changeFontSize: function (fontSize) {
|
|
current.updateFontSize(fontSize)
|
|
}
|
|
}
|