[Libreoffice-commits] core.git: vcl/unx

Isamu Mogi saturday6c at gmail.com
Sun May 26 23:01:05 PDT 2013


 vcl/unx/kde4/KDESalGraphics.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 762151c35990dcd46c42816f22618c4e6c3a5625
Author: Isamu Mogi <saturday6c at gmail.com>
Date:   Fri May 24 09:27:26 2013 +0900

    vcl: Add sink effect (QStyle::State_Sunken) to menubar on KDE
    
    A selected menubar item of cleanlooks, gtk+ and plastique styles
    becomes closer to standard looks by passing QStyle::State_Sunken
    with QStyle::CE_MenuBarItem to QStyle::drawControl(). It is
    currently not documented on QT developmet resources. But these
    styles interpret that.
    
    Change-Id: Ic7835bf0bf7af374ebdf8330d15b462d056de8a5
    Reviewed-on: https://gerrit.libreoffice.org/4017
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index a9115ee..2e9e33f 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -300,6 +300,9 @@ sal_Bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
             if ( nControlState & CTRL_STATE_ROLLOVER )
                 option.state |= QStyle::State_Selected;
 
+            if ( nControlState & CTRL_STATE_SELECTED ) // Passing State_Sunken is currently not documented.
+                option.state |= QStyle::State_Sunken;  // But some kinds of QStyle interpret it.
+
             draw( QStyle::CE_MenuBarItem, &option, m_image,
                   vclStateValue2StateFlag(nControlState, value) );
         }


More information about the Libreoffice-commits mailing list