QskMenu: Respect graphic padding (#196)
We need some padding for e.g. the Material 3 style.
This commit is contained in:
parent
1339a5f4cb
commit
264d53cb39
@ -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
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user