Skip to content

Commit

Permalink
Fusion style: add indent to groupbox title
Browse files Browse the repository at this point in the history
Add indent to the title if groupbox alignment is set to Qt::AlignLeft |
Qt::AlignVCenter.

Fixes: QTBUG-121049
Pick-to: 6.7 6.6
Change-Id: I25e2fe4e73b920baf4c678b6b0e758d1da7cf632
Reviewed-by: Christian Ehrlicher <[email protected]>
  • Loading branch information
Ghenady Kuznetsov committed Jan 31, 2024
1 parent e57f7b1 commit 4725bbb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/widgets/styles/qfusionstyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3366,6 +3366,10 @@ QRect QFusionStyle::subControlRect(ComplexControl control, const QStyleOptionCom
case Qt::AlignRight:
rect.moveLeft(option->rect.width() - width);
break;
case Qt::AlignLeft:
if ((groupBoxTextAlignment & Qt::AlignVertical_Mask) == Qt::AlignVCenter)
rect.moveLeft(proxy()->pixelMetric(PM_LayoutLeftMargin, option, widget));
break;
}
}

Expand Down

0 comments on commit 4725bbb

Please sign in to comment.