Skip to content

Commit

Permalink
Try to fix broken comparison [deploy]
Browse files Browse the repository at this point in the history
  • Loading branch information
dougmassay committed May 3, 2024
1 parent 23392e0 commit 4eeb362
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Misc/Utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,10 @@ bool Utility::IsDarkMode()
return mainApplication->isDarkMode();
#else // Windows, Linux and Other platforms
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
bool isdark = qApp->styleHints()->colorScheme() = Qt::ColorScheme::Dark;
return isdark;
if (qApp->styleHints()->colorScheme() == Qt::ColorScheme::Dark) {
return true;
}
return false;
#else // less than Qt6.5.0
QPalette app_palette = qApp->palette();
bool isdark = app_palette.color(QPalette::Active,QPalette::WindowText).lightness() > 128;
Expand Down

0 comments on commit 4eeb362

Please sign in to comment.