summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/control/button.cxx12
-rw-r--r--vcl/source/window/builder.cxx8
2 files changed, 14 insertions, 6 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 8a8d12629d26..3086de5cbb40 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -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 );
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index c4fe9acce6ff..6ba769d5864d 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -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)