summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.cpp
diff options
context:
space:
mode:
authorDoris Verria <doris.verria@qt.io>2022-10-04 14:21:03 +0200
committerDoris Verria <doris.verria@qt.io>2022-10-10 15:48:16 +0200
commitabbd9c91f5309924ac707706e3483747f44149a0 (patch)
tree6ac1c1eda7afb38c2814eaf9efee7f95a031df8d /src/gui/kernel/qguiapplication.cpp
parent9e7f91781d41ba588efac695c74e5304ec15625d (diff)
QIOSTheme: Set appearance based on UIScreen if no windows created yet
Set the theme's appearance based on the UIScreen's, which follows the app's or system's configuration, if no UIWindows are created yet. The UIWindow and UIScreen will have the same appearance (the traitCollection change is propagated hierarchically from screen to window) unless UIWindow's overrideUserStyleInterface is explicitly set to differ from that of the screen. In that case, traitCollectionDidChange will be called for the window (but not the screen) and when we update the palette calling the UIColor API, the colors will be resolved based on UITraitCollection.currentTraitCollection property, which follows the window's appearance. That is why we need to set the theme's appearance based on the window's. Change-Id: I43207f351559fb82efc2f281eafb3cd1c96bbf75 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
0 files changed, 0 insertions, 0 deletions