rounding issues when aligning QRects fixed ( no more jumping SVGs when
changing skins )
This commit is contained in:
parent
8413b8db9c
commit
eafd887f9c
@ -26,7 +26,8 @@ static inline Rect qskAlignedRect( const Rect& outerRect,
|
|||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
r.moveLeft( outerRect.center().x() - width / 2 );
|
const auto dx = ( outerRect.width() - width ) / 2;
|
||||||
|
r.moveLeft( outerRect.left() + dx );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,7 +45,8 @@ static inline Rect qskAlignedRect( const Rect& outerRect,
|
|||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
r.moveTop( outerRect.center().y() - height / 2 );
|
const auto dy = ( outerRect.height() - height ) / 2;
|
||||||
|
r.moveTop( outerRect.top() + dy );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user