Kaydet (Commit) d2bc27c8 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#76457 image buttons too narrow

but we liked the size of the symbol buttons

regression since 1f6e8827

Really the PushButton::CalcMinimumSize and PushButton::ImplDrawPushButton are
the better place to handle this, but its such a train-wreck

Change-Id: Ib7ba00c6a9c2698ff4e4f264c4242bf48a686da8
üst c30fd602
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment