diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-10-28 12:37:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-10-28 12:37:05 +0100 |
commit | 624ff6633c40ab678573a7a38fa3c83c41e0af17 (patch) | |
tree | 210bb4624ea8790d4c5a8b7293636383c30b979f /vcl | |
parent | b1271fc9baecc5098b9308fb26868bf3637a6293 (diff) |
only draw menubutton separator when two sides do something different
Change-Id: If6e3b72eacef2325f9f30770bbed32c627bc035c
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/button.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index e094ad49853a..cb0cb8b3d68e 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -868,7 +868,8 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl sal_uLong nImageSep = 1 + (pDev->GetTextHeight()-10)/2; if( nImageSep < 1 ) nImageSep = 1; - if ( mnDDStyle == PushButtonDropdownStyle::MenuButton ) + if ( mnDDStyle == PushButtonDropdownStyle::MenuButton || + mnDDStyle == PushButtonDropdownStyle::SplitMenuButton ) { long nSeparatorX = 0; Rectangle aSymbolRect = aInRect; @@ -1034,7 +1035,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext) return; bool bRollOver = (IsMouseOver() && aInRect.IsInside(GetPointerPosPixel())); - bool bDrawMenuSep = true; + bool bDrawMenuSep = mnDDStyle == PushButtonDropdownStyle::SplitMenuButton; if (GetStyle() & WB_FLATBUTTON) { if (!bRollOver && !HasFocus()) @@ -1642,7 +1643,8 @@ Size PushButton::CalcMinimumSize() const } else if ( Button::HasImage() && ! (ImplGetButtonState() & DrawButtonFlags::NoImage) ) aSize = GetModeImage().GetSizePixel(); - if( mnDDStyle == PushButtonDropdownStyle::MenuButton ) + if( mnDDStyle == PushButtonDropdownStyle::MenuButton || + mnDDStyle == PushButtonDropdownStyle::SplitMenuButton ) { long nSymbolSize = GetTextHeight() / 2 + 1; aSize.Width() += 2*nSymbolSize; |