Fix text position in mirrored layouts
This commit is contained in:
parent
4c1f60eb1c
commit
ffa150a5fd
|
@ -135,17 +135,15 @@ QRectF QskRadioBoxSkinlet::textRect( const QskRadioBox* radio,
|
|||
auto lh = lineHeight( radio );
|
||||
const auto textMargins = radio->marginHint( Q::Text );
|
||||
|
||||
result.setSize( { radio->strutSizeHint( Q::Text ).width(), lh } );
|
||||
|
||||
|
||||
result.moveTop( index * ( lh + spacing )
|
||||
+ lh - radio->effectiveFontHeight(Q::Text)
|
||||
+ textMargins.top());
|
||||
|
||||
if( !radio->layoutMirroring() ) {
|
||||
auto symbolWidth = buttonRect( radio, Q::Symbol, rect, index ).width();
|
||||
auto radioWidth = buttonRect( radio, Q::Button, rect, index ).width();
|
||||
result.moveLeft( qMax(symbolWidth, radioWidth) + textMargins.left());
|
||||
auto maxWidth = qMax( buttonRect( radio, Q::Symbol, rect, index ).width(),
|
||||
buttonRect( radio, Q::Button, rect, index ).width());
|
||||
|
||||
result.moveLeft( maxWidth + textMargins.left());
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue