summaryrefslogtreecommitdiff
path: root/vcl/unx/kde
diff options
context:
space:
mode:
authorIsamu Mogi <saturday6c@gmail.com>2013-05-17 11:00:39 +0000
committerFridrich Strba <fridrich@documentfoundation.org>2013-05-22 21:02:46 +0000
commit8eb1fb9eff4d4eea9c0c1c2e8d3b380e227b5d50 (patch)
tree535ba896fad1a8526fa45f03b5c70bd7961ce6f5 /vcl/unx/kde
parentd910bee3860fbcebcb91ccc60c6ff17a11e32d5d (diff)
Add mouse rollover effect to menubar on KDE and Windows
- Add mouse rollover handling code to vcl::MenuBarWindow and vcl::Menu - Add member variable of rollover color to StyleSettings and ImplStyleData - Add rollover color definitions for each platforms Change-Id: I9ececd8a7089918ac63c5f2027c0c2f361a9d227 Reviewed-on: https://gerrit.libreoffice.org/3856 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'vcl/unx/kde')
-rw-r--r--vcl/unx/kde/salnativewidgets-kde.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx
index ea013cacdc1d..85b9a148552c 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -777,6 +777,9 @@ sal_Bool WidgetPainter::drawStyledWidget( QWidget *pWidget,
int nMenuItem = ( nStyle & QStyle::Style_Enabled )? m_nMenuBarEnabledItem: m_nMenuBarDisabledItem;
QMenuItem *pMenuItem = static_cast<QMenuBar*>( pWidget )->findItem( nMenuItem );
+ if ( nStyle & QStyle::Style_MouseOver )
+ nStyle |= QStyle::Style_Active;
+
if ( nStyle & QStyle::Style_Selected )
nStyle |= QStyle::Style_Active | QStyle::Style_Down | QStyle::Style_HasFocus;
@@ -1983,6 +1986,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
aStyleSettings.SetMenuBarColor( aMenuBack );
aStyleSettings.SetMenuHighlightColor( toColor ( qMenuCG.highlight() ) );
+ aStyleSettings.SetMenuBarRolloverColor( toColor ( qMenuCG.highlight() ) );
// Menu items higlight text color, theme specific
if ( kapp->style().inherits( "HighContrastStyle" ) ||
@@ -1998,10 +2002,15 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
// set special menubar higlight text color
if ( kapp->style().inherits( "HighContrastStyle" ) )
+ {
ImplGetSVData()->maNWFData.maMenuBarHighlightTextColor = toColor( qMenuCG.highlightedText() );
+ aStyleSettings.SetMenuBarRolloverTextColor( toColor( qMenuCG.highlightedText() ) );
+ }
else
+ {
ImplGetSVData()->maNWFData.maMenuBarHighlightTextColor = aMenuFore;
-
+ aStyleSettings.SetMenuBarRolloverTextColor( aMenuFore );
+ }
// Font
aFont = toFont( pMenuBar->font(), rSettings.GetUILanguageTag().getLocale() );
aStyleSettings.SetMenuFont( aFont );