Resolves: fdo#76457 image buttons too narrow
but we liked the size of the symbol buttons
regression since 1f6e882760
Really the PushButton::CalcMinimumSize and PushButton::ImplDrawPushButton are
the better place to handle this, but its such a train-wreck
Change-Id: Ib7ba00c6a9c2698ff4e4f264c4242bf48a686da8
This commit is contained in:
@@ -1614,13 +1614,13 @@ Size PushButton::CalcMinimumSize( long nMaxWidth ) const
|
||||
PushButton::GetText(), ImplGetTextStyle( nDrawFlags ) ).GetSize();
|
||||
aSize.Width() += textSize.Width();
|
||||
aSize.Height() = std::max( aSize.Height(), long( textSize.Height() * 1.15 ) );
|
||||
}
|
||||
|
||||
// cf. ImplDrawPushButton ...
|
||||
if( (GetStyle() & WB_SMALLSTYLE) == 0 )
|
||||
{
|
||||
aSize.Width() += 24;
|
||||
aSize.Height() += 12;
|
||||
}
|
||||
// cf. ImplDrawPushButton ...
|
||||
if( (GetStyle() & WB_SMALLSTYLE) == 0 )
|
||||
{
|
||||
aSize.Width() += 24;
|
||||
aSize.Height() += 12;
|
||||
}
|
||||
|
||||
return CalcWindowSize( aSize );
|
||||
|
@@ -384,7 +384,15 @@ VclBuilder::VclBuilder(Window *pParent, const OUString& sUIDir, const OUString&
|
||||
if (eType == SYMBOL_NOSYMBOL)
|
||||
continue;
|
||||
if (!aI->m_bRadio)
|
||||
{
|
||||
pTargetButton->SetSymbol(eType);
|
||||
//fdo#76457 keep symbol images small e.g. tools->customize->menu
|
||||
//but images the right size. Really the PushButton::CalcMinimumSize
|
||||
//and PushButton::ImplDrawPushButton are the better place to handle
|
||||
//this, but its such a train-wreck
|
||||
if (eType != SYMBOL_IMAGE)
|
||||
pTargetButton->SetStyle(pTargetButton->GetStyle() | WB_SMALLSTYLE);
|
||||
}
|
||||
else
|
||||
SAL_WARN_IF(eType != SYMBOL_IMAGE, "vcl.layout", "inimplemented symbol type for radiobuttons");
|
||||
if (eType == SYMBOL_IMAGE)
|
||||
|
Reference in New Issue
Block a user