switch button: Fix size hint

This fixes the case where the Groove is bigger than the Handle, e.g.
with the Material 3 switch buttons.
This commit is contained in:
Peter Hartmann 2022-06-03 17:09:02 +02:00
parent fdd19894fb
commit d456237feb

View File

@ -67,7 +67,7 @@ QSizeF QskSwitchButtonSkinlet::sizeHint( const QskSkinnable* skinnable,
auto handleHint = skinnable->strutSizeHint( QskSwitchButton::Handle ); auto handleHint = skinnable->strutSizeHint( QskSwitchButton::Handle );
auto rippleHint = skinnable->strutSizeHint( QskSwitchButton::Ripple ); auto rippleHint = skinnable->strutSizeHint( QskSwitchButton::Ripple );
auto hint = grooveHint.expandedTo( grooveHint + rippleHint - handleHint ); auto hint = grooveHint;
hint = hint.expandedTo( rippleHint ); hint = hint.expandedTo( rippleHint );
hint = hint.expandedTo( handleHint ); hint = hint.expandedTo( handleHint );