2020-07-03 09:59:14 -04:00

20 lines
506 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"')
}
}
}