diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-05-24 12:02:01 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-05-24 12:07:16 +0100 |
commit | 4881ec4acc4320475c154a07be2fe74a571f3f4c (patch) | |
tree | 24cba35d930b6e348c72ec7e6595cdb59f124d13 | |
parent | dbfafb5475501c6fd0cb2c47fcef03b5d145fabf (diff) |
sync the menubutton size request and draw calculations
Change-Id: I122254532dfe8ecd9c3118622bf24b50f885a0f6
-rw-r--r-- | vcl/source/control/button.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 4254113aef7c..78a600b184ec 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -1678,11 +1678,14 @@ Size PushButton::CalcMinimumSize( long nMaxWidth ) const aSize = Size( 16, 12 ); else aSize = Size( 26, 24 ); - if( mnDDStyle == PUSHBUTTON_DROPDOWN_MENUBUTTON ) - aSize.Width() += 4; } else if ( IsImage() && ! (ImplGetButtonState() & BUTTON_DRAW_NOIMAGE) ) aSize = GetModeImage().GetSizePixel(); + if( mnDDStyle == PUSHBUTTON_DROPDOWN_MENUBUTTON ) + { + long nSymbolSize = GetTextHeight() / 2 + 1; + aSize.Width() += 2*nSymbolSize; + } if ( !PushButton::GetText().isEmpty() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) ) { sal_uLong nDrawFlags = 0; |