Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.0 Beta3
-
None
-
-
170fadadd (dev), 7b96dad1e (6.5), 489b070b6 (dev), 23d41c2b6 (6.5)
Description
The UI is correctly colored in light style, so the frame should be light as well.
To decide whether a window should get a dark or a light window frame, qwindowswindow.cpp implements a helper static inline bool shouldApplyDarkFrame(const QWindow *w) that checks the default palette's QPalette::Window vs QPalette::WindowText color. QWindow has no concept of palette.
Qt Quick, we can only override the palette to be light for Qt Quick Controls (as Qt Quick has no concept of style or palette), and the default QGuiApplication::palette still uses the platform theme's palette, and that is unchanged by the style.
So, QWindowsWindow knows nothing about Qt Quick's styling and theming. Either we overwrite the default QGuiApplication::palette in the style (but then we have problems with recursion, and with handling changes of the system palette). Or we put logic into QQuickApplicationWindow to set a dynamic property on the QWindow (it could just be the palette). Then our static helper could check that property and use that instead of evaluating the default palette.
Attachments
For Gerrit Dashboard: QTBUG-111491 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
462867,5 | Provide window palette for quickcontrol application window | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
462868,6 | Add API in QWindowsPrivate to provide window palette | dev | qt/qtbase | Status: MERGED | +2 | 0 |
463395,2 | Add API in QWindowsPrivate to provide window palette | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |
464170,2 | Provide window palette for quickcontrol application window | 6.5 | qt/qtdeclarative | Status: MERGED | +2 | 0 |