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 <liang.qi@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 41e665a452166259b5cad64994de3298751eb7f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Christian Ehrlicher 2020-12-22 19:45:10 +01:00 committed by Qt Cherry-pick Bot
parent b02ed9696f
commit 6663d90d19

View File

@ -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) {