Skip to content

Commit 218c0b7

Browse files
committed
qt: make isSystemInDarkMode() work in qt<6.5
1 parent 9720a01 commit 218c0b7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gui/qt/utils.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,12 @@ bool isRunningInDarkMode() {
119119
}
120120

121121
bool isSystemInDarkMode() {
122+
#if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 0))
122123
return qApp->styleHints()->colorScheme() == Qt::ColorScheme::Dark;
124+
#else
125+
// TODO: handle other OS' way to know if we're running in dark mode
126+
return isRunningInDarkMode();
127+
#endif
123128
}
124129

125130

0 commit comments

Comments
 (0)