summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qcommonstyle.cpp
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2024-02-02 16:35:29 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2024-02-13 00:53:25 +0100
commit5a032f0b3fcfb7dbd63e784dedaa8e27fc34ce3d (patch)
tree1c56dbf77df9b4523e45509f7fd86fb06bac0f42 /src/widgets/styles/qcommonstyle.cpp
parentfc23fa459c5924bf1cc4564c7bce1fd59d7c972b (diff)
QFusionStyle: Pass handling of FrameGroupBox to base style
The fusion style had an own handling for PE_FrameGroupBox/SC_GroupBoxFrame but failed to handle all cases (e.g. with checkbox, text and horizontal alignment) correct. In contrast, the base class (QCommonStyle) is properly handling all those attributes and returns a correct subControlRect(). Therefore remove the special handling, let styleHint() return the correct value for SH_GroupBox_TextLabelVerticalAlginment based on the groupBox's text alignment and rely on QCommonStyle ability to calculate the correct values. Pick-to: 6.7 6.6 Fixes: QTBUG-85425 Fixes: QTBUG-95472 Change-Id: I98ccf861274026a8fd4a2ef436efc3bb009be056 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Diffstat (limited to 'src/widgets/styles/qcommonstyle.cpp')
-rw-r--r--src/widgets/styles/qcommonstyle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index 9d677ae076..a7d52b9755 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -4384,7 +4384,7 @@ QRect QCommonStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex
if (verticalAlignment & Qt::AlignVCenter)
topMargin = topHeight / 2;
else if (verticalAlignment & Qt::AlignTop)
- topMargin = topHeight;
+ topMargin = topHeight + proxy()->pixelMetric(PM_FocusFrameVMargin, groupBox, widget);
}
QRect frameRect = groupBox->rect;