Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: Set proper window title bar color #962

Merged
merged 2 commits into from
Apr 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions App/NatronApp_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ int main(int argc, char *argv[])
freopen("CONOUT$", "w", stderr);
}
}
#if QT_VERSION < QT_VERSION_CHECK(6, 5, 0)
// Set proper window title bar color (https://www.qt.io/blog/dark-mode-on-windows-11-with-qt-6.5)
rodlie marked this conversation as resolved.
Show resolved Hide resolved
QSettings registry(QString::fromUtf8("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"),
QSettings::NativeFormat);
if (registry.value(QString::fromUtf8("AppsUseLightTheme"), 0).toInt() == 0) {
qputenv("QT_QPA_PLATFORM", "windows:darkmode=1");
}
#endif
#endif

#if defined(Q_OS_UNIX) && defined(RLIMIT_NOFILE)
Expand Down