Skip to content
Commit f0e3581b authored by Nicholas Omann's avatar Nicholas Omann Committed by Albert Astals Cid
Browse files

Enable Support for Dark Theme for Titlebar in Windows

When using the windows dark theme it's annoying to have white titlebars on some apps. I noticed that this app which and I would like to use on Windows but the lack of dark theme on the titlebar makes it not fit in well. I did some research on this and found that the best way to set it seems to be using the darkmode toggle on the platform. That can be set as a parameter or environment variable. This seems to be the easiest way to set it. I tested this locally on a Win11 VM and it looks to work the same as setting -platform windows:darkmode=1 or setting QT_QPA_PLATFORM=windows:darkmode=1. Note this does need to be set before the QApplication is originally created and so I think it has to be done per app to work. If I missed some other way to set this that would be better I would be interested to know more.

QT Docs: https://doc.qt.io/qt-5/qguiapplication.html#platform-specific-arguments
parent 048349d3
Pipeline #287681 passed with stage
in 11 minutes and 12 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment