using subControlRect

This commit is contained in:
Uwe Rathmann 2019-11-27 17:38:34 +01:00
parent 556475cca6
commit e9a8c0bc7f

View File

@ -98,7 +98,9 @@ QRectF QskPushButtonSkinlet::graphicRect(
if ( !button->text().isEmpty() )
{
qreal h = textRect( button, contentsRect ).height() +
const auto textRect = subControlRect( button, contentsRect, QskPushButton::Text );
qreal h = textRect.height() +
button->metric( QskPushButton::Panel | QskAspect::Spacing );
if ( h < r.height() )