From d76c6eaac0024a67aeed8e5b8ee3f842860edaf9 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Mon, 25 Nov 2024 16:40:23 +0800 Subject: [PATCH] Add connectToSignal on darkMode property fetch Theme may be instantiated before the qApp is available Signed-off-by: Claudio Cambra --- src/libsync/theme.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libsync/theme.cpp b/src/libsync/theme.cpp index 84fbe1868..a77aa4450 100644 --- a/src/libsync/theme.cpp +++ b/src/libsync/theme.cpp @@ -1010,6 +1010,7 @@ QVariantMap Theme::systemPalette() const bool Theme::darkMode() const { + connectToPaletteSignal(); const auto isDarkFromStyle = [] { switch (qGuiApp->styleHints()->colorScheme()) { -- 2.30.2