Add PCN theme system
Coexist with the old theme system for now. QML components have to be updated to use the new system.
This commit is contained in:
@@ -73,6 +73,7 @@ QtObject {
|
||||
}
|
||||
|
||||
type === "Settings" ? window.settings = newData :
|
||||
type === "NewTheme" ? window.themeRules = newData :
|
||||
type === "UIState" ? window.uiState = newData :
|
||||
type === "History" ? window.history = newData :
|
||||
null
|
||||
|
@@ -21,12 +21,13 @@ PythonBridge {
|
||||
addImportPath("qrc:/src")
|
||||
|
||||
importNames("backend.qml_bridge", ["BRIDGE"], () => {
|
||||
callCoro("get_settings", [], ([settings, state, hist, theme]) => {
|
||||
window.settings = settings
|
||||
window.uiState = state
|
||||
window.history = hist
|
||||
window.theme = Qt.createQmlObject(theme, window, "theme")
|
||||
utils.theme = window.theme
|
||||
callCoro("get_settings", [], ([settings, state, hist, theme, themeRules]) => {
|
||||
window.settings = settings
|
||||
window.uiState = state
|
||||
window.history = hist
|
||||
window.theme = Qt.createQmlObject(theme, window, "theme")
|
||||
utils.theme = window.theme
|
||||
window.themeRules = themeRules
|
||||
|
||||
callCoro("saved_accounts.any_saved", [], any => {
|
||||
if (any) { callCoro("load_saved_accounts", []) }
|
||||
|
Reference in New Issue
Block a user