push buttons: Fix layouting for eliding and wrapping texts
This commit is contained in:
parent
27f79c7c0e
commit
689f45f710
@ -39,17 +39,11 @@ namespace
|
||||
QskPushButton::Text, button->text(),
|
||||
QskPushButton::Graphic, button->graphic().defaultSize() );
|
||||
|
||||
const auto textOptions = button->textOptions();
|
||||
|
||||
if ( ( textOptions.elideMode() == Qt::ElideNone )
|
||||
&& ( textOptions.wrapMode() == QskTextOptions::NoWrap ) )
|
||||
{
|
||||
const auto alignment = button->alignmentHint(
|
||||
QskPushButton::Panel, Qt::AlignCenter );
|
||||
|
||||
setFixedContent( QskPushButton::Text, Qt::Horizontal, alignment );
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -413,7 +413,7 @@ void QskSubcontrolLayoutEngine::setFixedContent(
|
||||
{
|
||||
if( auto* e = element( subcontrol ) )
|
||||
{
|
||||
e->setSizePolicy( QskSizePolicy::Fixed, e->sizePolicy().verticalPolicy() );
|
||||
e->setSizePolicy( QskSizePolicy::Maximum, e->sizePolicy().verticalPolicy() );
|
||||
}
|
||||
|
||||
Qt::Edges extraSpacing;
|
||||
|
Loading…
x
Reference in New Issue
Block a user