From e00084e163a03af3e234f805a22d638072811ae8 Mon Sep 17 00:00:00 2001 From: Wladimir Leuschner Date: Tue, 22 Oct 2024 10:52:57 +0200 Subject: [PATCH] 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 (cherry picked from commit d5afa192a32ac7187621f37b5f8baaf2388730dd) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/styles/modernwindows/qwindows11style.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/styles/modernwindows/qwindows11style.cpp b/src/plugins/styles/modernwindows/qwindows11style.cpp index 3e13983846..a0b3c8c2b9 100644 --- a/src/plugins/styles/modernwindows/qwindows11style.cpp +++ b/src/plugins/styles/modernwindows/qwindows11style.cpp @@ -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);