From a13a0024d6a65f893dd0aef45f9eb3e897103d60 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sat, 23 Dec 2017 20:09:33 +0100 Subject: QToolButton: adjust menu indicator in RTL-mode The menu indicator was not adjusted in RTL-Mode to be on the left side of the text. Use visualRect() to adjust the rectangle before drawing the PE_IndicatorArrowDown. Task-number: QTBUG-50084 Change-Id: I20129499f111d06637c98ede23b4635a3fc34a6c Reviewed-by: Friedemann Kleint Reviewed-by: Richard Moe Gustavsen --- src/widgets/styles/qcommonstyle.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index 1155257664..e4d3c6a9e1 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -3411,6 +3411,7 @@ void QCommonStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCompl QRect ir = toolbutton->rect; QStyleOptionToolButton newBtn = *toolbutton; newBtn.rect = QRect(ir.right() + 5 - mbi, ir.y() + ir.height() - mbi + 4, mbi - 6, mbi - 6); + newBtn.rect = visualRect(toolbutton->direction, button, newBtn.rect); proxy()->drawPrimitive(PE_IndicatorArrowDown, &newBtn, p, widget); } } -- cgit v1.2.3