Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Windows: better handling of darkmode support
43ef220 turned dark mode support on for both styling and window frames. However, the default palette and style support in Qt is too incomplete, resulting in unreadable UIs when using certain styles (e.g. fusion). Also the vista style is not supporting dark mode. If we don't turn on dark style support, then dark frame support doesn't look good either. However, many application developers have implement a dark theme themselves, and we should have a dark frame for those applications. So partially revert 43ef220 so that dark style support is disabled by default, and leave dark frame support on. However, only activate dark frames if the palette is dark, i.e. if the window background color in the default palette is darker than the text color (or if DarkModeStyle is explicitly turned on by running the application with -platform windows:darkmode=2). This way, dark-themed applications get a dark frame on dark Windows, and a light frame on light Windows; and light-themed applications (including default Qt applications) get a light frame all the time. Fixes: QTBUG-72028 Pick-to: 6.4 Change-Id: I61f1b1e43b2a4ba69848d5d8bec921c0790fe511 Reviewed-by: Marius Kittler <[email protected]> Reviewed-by: Oliver Wolff <[email protected]>
- Loading branch information