summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-05-17 04:15:12 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-05-18 13:15:00 +0200
commit9d41bd431280d7bb1f0fa3865e49a13200ff9608 (patch)
tree5f04f705b14ba29aa6da8313726a65a17420a1a5 /tests
parent2f35653a3058840e042ed92aba8f04d0abdf7d61 (diff)
Stylesheet: Another positioning fix for the menu indicator
Draw tool button menu indicator relative to frame, not content, so that padding added in the stylesheet creates room between text and indicator. Also, prevent another double-arrow by ignoring menu indicator rendering when a menu button subcontrol is used, as the two are mutually exclusive. This amends 1c338e6d07a42631a6603c5bb0bc86f6806addd6. Add problematic case to stylesheet baseline test. Fixes: QTBUG-102866 Pick-to: 6.3 6.2 Change-Id: I5d79e65b33a2e41ac07c8efe0c15697c5be65201 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/baseline/stylesheet/qss/qtoolbutton/menuButton_subcontrol_padding.qss12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/baseline/stylesheet/qss/qtoolbutton/menuButton_subcontrol_padding.qss b/tests/baseline/stylesheet/qss/qtoolbutton/menuButton_subcontrol_padding.qss
new file mode 100644
index 0000000000..44e67671f0
--- /dev/null
+++ b/tests/baseline/stylesheet/qss/qtoolbutton/menuButton_subcontrol_padding.qss
@@ -0,0 +1,12 @@
+QToolButton {
+ border: 5px solid #9e9e9e;
+ background: #ffffff;
+ padding-top: 8px;
+ padding-bottom: 8px;
+}
+QToolButton[popupMode=InstantPopup] {
+ padding-right: 75px;
+}
+QToolButton::menu-indicator {
+ subcontrol-position: right;
+};