summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-10-28 12:37:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-10-28 12:37:05 +0100
commit624ff6633c40ab678573a7a38fa3c83c41e0af17 (patch)
tree210bb4624ea8790d4c5a8b7293636383c30b979f /vcl
parentb1271fc9baecc5098b9308fb26868bf3637a6293 (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.cxx8
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;