QskMenu: Respect graphic padding

We need some padding for e.g. the Material 3 style.
This commit is contained in:
Peter Hartmann 2022-06-13 16:52:07 +02:00
parent 3df987894e
commit e6120baf15
1 changed files with 3 additions and 1 deletions

View File

@ -323,8 +323,10 @@ QRectF QskMenuSkinlet::sampleRect(
{ {
auto graphicRect = r; auto graphicRect = r;
graphicRect.setWidth( graphicWidth ); 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 else
{ {