QskMenu: Respect graphic padding (#196)

We need some padding for e.g. the Material 3 style.
This commit is contained in:
Peter Hartmann 2022-06-13 17:18:47 +02:00 committed by GitHub
parent 1339a5f4cb
commit 264d53cb39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -323,8 +323,10 @@ QRectF QskMenuSkinlet::sampleRect(
{
auto graphicRect = r;
graphicRect.setWidth( graphicWidth );
const auto padding = menu->paddingHint( QskMenu::Graphic );
graphicRect = graphicRect.marginsRemoved( padding );
return QRectF( r.x(), r.y(), graphicWidth, r.height() );
return graphicRect;
}
else
{