windows: fix dark mode

This commit is contained in:
tobtoht 2023-01-22 23:19:23 +01:00
parent 200a7c0bbb
commit 7fcc5f64c3
No known key found for this signature in database
GPG key ID: E45B10DD027D2472

View file

@ -37,6 +37,12 @@ if (AttachConsole(ATTACH_PARENT_PROCESS)) {
}
#endif
// #TODO: Fix Windows dark mode handling Qt 6.5 beta1
// darkmode=2 (default) causes some text to become unreadable
#if defined(Q_OS_WIN)
qputenv("QT_QPA_PLATFORM", "windows:darkmode=1");
#endif
QStringList argv_;
for(int i = 0; i != argc; i++){
argv_ << QString::fromStdString(argv[i]);