using subControlRect
This commit is contained in:
parent
556475cca6
commit
e9a8c0bc7f
@ -98,7 +98,9 @@ QRectF QskPushButtonSkinlet::graphicRect(
|
|||||||
|
|
||||||
if ( !button->text().isEmpty() )
|
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 );
|
button->metric( QskPushButton::Panel | QskAspect::Spacing );
|
||||||
|
|
||||||
if ( h < r.height() )
|
if ( h < r.height() )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user