History

Dark theme setting

Ada committed 1 year ago

Commit d4b03181 parent 4cbde7e6 files · +82 −0Browse files

Showing the changes to interface/src/scripting/WindowScriptingInterface.cpp (1 of 6 files). Show all

Unified · Split

interface/src/scripting/WindowScriptingInterface.cpp+8−0
@@ -62,6 +62,10 @@ WindowScriptingInterface::WindowScriptingInterface() { · 61 unmodified lines
6262 connect(qApp, &Application::interstitialModeChanged, [this] (bool interstitialMode) {
6363 emit interstitialModeChanged(interstitialMode);
6464 });
65+
66+ connect(qApp, &Application::darkThemePreferenceChanged, [this](bool useDarkTheme) {
67+ emit darkThemePreferenceChanged(useDarkTheme);
68+ });
6569 }
6670
6771 WindowScriptingInterface::~WindowScriptingInterface() {
@@ -672,3 +676,7 @@ void WindowScriptingInterface::openWebBrowser(const QString& url) { · 604 unmodified lines
672676 }
673677 });
674678 }
679+
680+bool WindowScriptingInterface::getDarkThemePreference() {
681+ return qApp->getDarkThemePreference();
682+}