Kaydet (Commit) 762151c3 authored tarafından Isamu Mogi's avatar Isamu Mogi Kaydeden (comit) David Tardon

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/4017Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst 54fbbc20
......@@ -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) );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment