diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2017-12-23 20:09:33 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-01-03 07:53:33 +0000 |
commit | a13a0024d6a65f893dd0aef45f9eb3e897103d60 (patch) | |
tree | c298218fa1ce34317fe81d14c39f42c6f3043b8f /src/widgets | |
parent | e95495142321fdf5c3a50a7ff6322a711be68555 (diff) |
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 <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/styles/qcommonstyle.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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); } } |