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>bb10
parent
e954951423
commit
a13a0024d6
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue