qt5base-lts/tests/auto/widgets/styles/qstylesheetstyle
Volker Hilsheimer 55433f90af Stylesheet: Fix tab layout when tab has a font and icons
Amends e3b2b12a91, which made the
style sheet calculate the font-dependent text size, but didn't
add the space needed for the close button or a tab icon.

QTabBar's layout code already adds the space needed for icons
and margins to the size; so instead of overwriting that size,
subtract the size needed by the normal font, and then add the
size needed for the font form the style rule, considering both
vertical and horizontal tab bars.

Fix the test case to style only one tab rather than the entire
tab bar, otherwise the font is applied to the entire tab bar,
and not just to a specific tab, which is the style sheet style
code in question.

Pick-to: 6.2 6.3
Task-number: QTBUG-6905
Change-Id: Ieed0ba146a32e81229419adecaf41f467cfd5959
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-02-02 07:10:12 +01:00
..
images StyleSheetStyle: Load @Nx images 2018-10-04 07:01:05 +00:00
.gitignore Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
BLACKLIST tst_qstylesheetstyle: blacklist tests for QEMU ARMv7 2021-01-07 16:53:43 +02:00
CMakeLists.txt CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
resources.qrc StyleSheetStyle: Load @Nx images 2018-10-04 07:01:05 +00:00
tst_qstylesheetstyle.cpp Stylesheet: Fix tab layout when tab has a font and icons 2022-02-02 07:10:12 +01:00