qt6-bb10/src/plugins/styles
Volker Hilsheimer 4ac00ca901 QTabBar: let styles draw tab text with foreground role
QTabBar::setTabTextColor's documentation and implementation suggests
that the set color will always be used unless invalid, and that the
foreground role is used otherwise. QTabBar then sets the foregroundRole
palette entry to the specified color before calling the style. The intent
is evidently that the tabTextColor is used no matter the foregroundRole
(which by default is the role that contrasts with the background role).

If the styles always paint the text with WindowText, then the tabTextColor
gets ignored if the foregroundRole is not WindowText (perhaps because
the backgroundRole is set to Base).

Fix this by respecting the widget's foregroundRole when painting the tab
label in the common style (which is the only style that implements
drawControl for CE_TabBarTabLabel). QMacStyle and QStyleSheetStyle
need to be adjusted to prepare the palette consistently with the logic
in QTabBar.

Pick-to: 6.3 6.2
Fixes: QTBUG-101456
Change-Id: I077a2034eebfe3f56cea28917494f4db01e48747
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-03-21 19:41:23 +00:00
..
android Add style hint for preventing spin box selection on up/down 2021-10-08 00:45:18 +02:00
mac QTabBar: let styles draw tab text with foreground role 2022-03-21 19:41:23 +00:00
windowsvista Enable tests to turn off Windows Vista animations 2022-03-16 15:56:17 +01:00
CMakeLists.txt Enable the Android style plugin for the cmake build 2020-10-12 14:49:24 +02:00