summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsamu Mogi <saturday6c@gmail.com>2013-05-24 09:27:26 +0900
committerDavid Tardon <dtardon@redhat.com>2013-05-27 06:00:45 +0000
commit762151c35990dcd46c42816f22618c4e6c3a5625 (patch)
tree3ebafb950af808b012ceee756fc3be78288e7a79
parent54fbbc20b8397a8362f5a0878744c3a082464713 (diff)
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@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
-rw-r--r--vcl/unx/kde4/KDESalGraphics.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index a9115eee5fe5..2e9e33fd585d 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) );
}