include/vcl/toolkit/button.hxx | 3 --- vcl/source/control/button.cxx | 16 ++++------------ 2 files changed, 4 insertions(+), 15 deletions(-)
New commits: commit c478ba187e1fcd6295ca9b30ae303bf81dac07c0 Author: Noel Grandin <[email protected]> AuthorDate: Mon Sep 29 11:57:11 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Mon Sep 29 15:41:18 2025 +0200 loplugin:unusedenumconstants Change-Id: I7fe5faeb4e1fd659cc9813687bb3209df6a0e021 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191611 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/include/vcl/toolkit/button.hxx b/include/vcl/toolkit/button.hxx index ccbd0f03b70a..75bf940ef6dd 100644 --- a/include/vcl/toolkit/button.hxx +++ b/include/vcl/toolkit/button.hxx @@ -114,7 +114,6 @@ enum class PushButtonDropdownStyle { NONE = 0x0000, MenuButton = 0x0002, //visual down arrow - SplitMenuButton = 0x0003, //visual down arrow and separator line }; class VCL_DLLPUBLIC PushButton : public Button diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 14f65c850142..d3fe331b543c 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -919,8 +919,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice *pDev, SystemTextColorFl sal_Int32 nImageSep = 1 + (pDev->GetTextHeight()-10)/2; if( nImageSep < 1 ) nImageSep = 1; - if ( mnDDStyle == PushButtonDropdownStyle::MenuButton || - mnDDStyle == PushButtonDropdownStyle::SplitMenuButton ) + if ( mnDDStyle == PushButtonDropdownStyle::MenuButton ) { tools::Long nSeparatorX = 0; tools::Rectangle aSymbolRect = aInRect; @@ -1069,12 +1068,6 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext) bool bRollOver = (IsMouseOver() && aInRect.Contains(GetPointerPosPixel())); if (bRollOver) nButtonStyle |= DrawButtonFlags::Highlight; - bool bDrawMenuSep = mnDDStyle == PushButtonDropdownStyle::SplitMenuButton; - if (GetStyle() & WB_FLATBUTTON) - { - if (!bRollOver && !HasFocus()) - bDrawMenuSep = false; - } // tdf#123175 if there is a custom control bg set, draw the button without outsourcing to the NWF bNativeOK = !IsControlBackground() && rRenderContext.IsNativeControlSupported(ControlType::Pushbutton, ControlPart::Entire); if (bNativeOK) @@ -1147,7 +1140,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext) // draw content using the same aInRect as non-native VCL would do ImplDrawPushButtonContent(&rRenderContext, SystemTextColorFlags::NONE, - aInRect, bDrawMenuSep, nButtonStyle); + aInRect, /*bDrawMenuSep*/false, nButtonStyle); if (HasFocus()) ShowFocus(ImplGetFocusRect()); @@ -1172,7 +1165,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext) } // draw content - ImplDrawPushButtonContent(&rRenderContext, SystemTextColorFlags::NONE, aInRect, bDrawMenuSep, nButtonStyle); + ImplDrawPushButtonContent(&rRenderContext, SystemTextColorFlags::NONE, aInRect, /*bDrawMenuSep*/false, nButtonStyle); if (HasFocus()) { @@ -1706,8 +1699,7 @@ Size PushButton::CalcMinimumSize() const } else if ( Button::HasImage() ) aSize = GetModeImage().GetSizePixel(); - if( mnDDStyle == PushButtonDropdownStyle::MenuButton || - mnDDStyle == PushButtonDropdownStyle::SplitMenuButton ) + if( mnDDStyle == PushButtonDropdownStyle::MenuButton ) { tools::Long nSymbolSize = GetTextHeight() / 2 + 1; aSize.AdjustWidth(2*nSymbolSize ); commit 84c444de422f9a89bd1f45f4303221b18009382b Author: Noel Grandin <[email protected]> AuthorDate: Mon Sep 29 11:49:05 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Mon Sep 29 15:41:09 2025 +0200 loplugin:unusedmethods Change-Id: Ib27268255a023439e76242c85423544a784243cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191610 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/include/vcl/toolkit/button.hxx b/include/vcl/toolkit/button.hxx index 4d8e6fdc8571..ccbd0f03b70a 100644 --- a/include/vcl/toolkit/button.hxx +++ b/include/vcl/toolkit/button.hxx @@ -56,8 +56,6 @@ public: SAL_DLLPRIVATE void ImplSetFocusRect( const tools::Rectangle &rFocusRect ); SAL_DLLPRIVATE const tools::Rectangle& ImplGetFocusRect() const; SAL_DLLPRIVATE void ImplSetSymbolAlign( SymbolAlign eAlign ); - /// The x-coordinate of the vertical separator line, use in MenuButton subclass only. - SAL_DLLPRIVATE void ImplSetSeparatorX( tools::Long nX ); protected: SAL_DLLPRIVATE explicit Button( WindowType eType );
