From 6663d90d19fe40f297cb2e1d5cf9a33a053f4d98 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Tue, 22 Dec 2020 19:45:10 +0100 Subject: QStylesheetStyle: fix push button label alignment Due to a copy'n'paste error in 01ec11507d7ef3de09bad9d1ef8e6d4a3d6c4428 the valign was not properly determined for text-align bottom. Fixes: QTBUG-89366 Change-Id: I081e1b24bba0edd9dd3754599a111c1658b18746 Reviewed-by: Liang Qi Reviewed-by: Friedemann Kleint (cherry picked from commit 41e665a452166259b5cad64994de3298751eb7f3) Reviewed-by: Qt Cherry-pick Bot --- src/widgets/styles/qstylesheetstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/styles') diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 142366d2e3..d060be5572 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -3553,7 +3553,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q QRect textRect = button->rect; const uint horizontalAlignMask = Qt::AlignHCenter | Qt::AlignLeft | Qt::AlignRight; - const uint verticalAlignMask = Qt::AlignVCenter | Qt::AlignTop | Qt::AlignLeft; + const uint verticalAlignMask = Qt::AlignVCenter | Qt::AlignTop | Qt::AlignBottom; const Qt::Alignment textAlignment = rule.position()->textAlignment; if (rule.hasPosition() && textAlignment != 0) { -- cgit v1.2.3