vcl/source/control/button.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4006b855cc94fbd817f9c19d7361b5d6a06d152e
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Oct 5 13:02:23 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed Oct 5 15:50:59 2022 +0200

    Related: tdf#151351 kf5 pressed flat toggle buttons not visually depressed
    
    Change-Id: I3ab2ec91f3317dbd5a7e011e5b81d0a5141b1348
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140978
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 86eae5be89c4..0edb9d9002d1 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1124,7 +1124,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& 
rRenderContext)
         Size aInRectSize(rRenderContext.LogicToPixel(Size(aInRect.GetWidth(), 
aInRect.GetHeight())));
         aControlValue.mbSingleLine = (aInRectSize.Height() < 2 * 
aFontSize.Height());
 
-        if ((nState & ControlState::ROLLOVER) || !(GetStyle() & WB_FLATBUTTON)
+        if (!aControlValue.m_bFlatButton || (nState & ControlState::ROLLOVER) 
|| (nState & ControlState::PRESSED)
             || (HasFocus() && mpWindowImpl->mbUseNativeFocus
                 && !IsNativeControlSupported(ControlType::Pushbutton, 
ControlPart::Focus)))
         {

Reply via email to