QWindows11Style: Adjust ArrowRect offset for RTL QComboBox

Adjust the arrow rect, so that the arrow is not outside of the combobox
frame in RTL mode.

Change-Id: Ieddda7be4959a37a4c47ab9fe8e4d6bae4e91f04
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit d5afa192a32ac7187621f37b5f8baaf2388730dd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
bb10
Wladimir Leuschner 2024-10-22 10:52:57 +02:00 committed by Qt Cherry-pick Bot
parent 197c3e61fe
commit e00084e163
1 changed files with 1 additions and 1 deletions

View File

@ -454,7 +454,7 @@ void QWindows11Style::drawComplexControl(ComplexControl control, const QStyleOpt
painter->setPen(highContrastTheme == true ? combobox->palette.buttonText().color() : WINUI3Colors[colorSchemeIndex][frameColorLight]);
painter->drawRoundedRect(rect, secondLevelRoundingRadius, secondLevelRoundingRadius);
if (sub & SC_ComboBoxArrow) {
QRectF rect = proxy()->subControlRect(CC_ComboBox, option, SC_ComboBoxArrow, widget).adjusted(-4, 0, -4, 1);
QRectF rect = proxy()->subControlRect(CC_ComboBox, option, SC_ComboBoxArrow, widget).adjusted(4, 0, -4, 1);
painter->setFont(assetFont);
painter->setPen(combobox->palette.text().color());
painter->drawText(rect,"\uE70D", Qt::AlignVCenter | Qt::AlignHCenter);