summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/unx/generic/window/salframe.cxx1
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx2
-rw-r--r--vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx2
-rw-r--r--vcl/unx/kde/salnativewidgets-kde.cxx2
-rw-r--r--vcl/unx/kde4/KDESalFrame.cxx2
-rw-r--r--vcl/win/source/gdi/salnativewidgets-luna.cxx5
-rw-r--r--vcl/win/source/window/salframe.cxx12
7 files changed, 18 insertions, 8 deletions
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index af6ce24545fd..a292449b66db 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -2551,6 +2551,7 @@ void X11SalFrame::UpdateSettings( AllSettings& rSettings )
{
StyleSettings aStyleSettings = rSettings.GetStyleSettings();
aStyleSettings.SetCursorBlinkTime( 500 );
+ aStyleSettings.SetMenuBarTextColor( aStyleSettings.GetPersonaMenuBarTextColor().get_value_or( Color( COL_BLACK ) ) );
rSettings.SetStyleSettings( aStyleSettings );
}
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 76e5d44b5359..be7b35e53c5b 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -3888,7 +3888,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetMenuColor( aBackColor );
aStyleSet.SetMenuTextColor( aTextColor );
- aTextColor = getColor( pMenubarStyle->fg[GTK_STATE_NORMAL] );
+ aTextColor = aStyleSet.GetPersonaMenuBarTextColor().get_value_or( getColor( pMenubarStyle->fg[GTK_STATE_NORMAL] ) );
aStyleSet.SetMenuBarTextColor( aTextColor );
aStyleSet.SetMenuBarRolloverTextColor( aTextColor );
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index 311746d92f3b..9ddeda38e27a 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -1212,7 +1212,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetMenuBarRolloverColor( aBackColor );
gtk_style_context_get_color( mpMenuBarStyle, GTK_STATE_FLAG_NORMAL, &text_color );
- aTextColor = getColor( text_color );
+ aTextColor = aStyleSet.GetPersonaMenuBarTextColor().get_value_or( getColor( text_color ) );
aStyleSet.SetMenuBarTextColor( aTextColor );
aStyleSet.SetMenuBarRolloverTextColor( aTextColor );
diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx
index f95740fbe8fe..5e58799fcd9e 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -1982,7 +1982,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
}
aStyleSettings.SetMenuTextColor( aMenuFore );
- aStyleSettings.SetMenuBarTextColor( aMenuFore );
+ aStyleSettings.SetMenuBarTextColor( aStyleSettings.GetPersonaMenuBarTextColor().get_value_or( aMenuFore ) );
aStyleSettings.SetMenuColor( aMenuBack );
aStyleSettings.SetMenuBarColor( aMenuBack );
aStyleSettings.SetMenuHighlightColor( toColor ( qMenuCG.highlight() ) );
diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx
index 8afc217d969e..25b092a17106 100644
--- a/vcl/unx/kde4/KDESalFrame.cxx
+++ b/vcl/unx/kde4/KDESalFrame.cxx
@@ -299,7 +299,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
Color aMenuBack = toColor( qMenuCG.color( QPalette::Window ) );
style.SetMenuTextColor( aMenuFore );
- style.SetMenuBarTextColor( aMenuFore );
+ style.SetMenuBarTextColor( style.GetPersonaMenuBarTextColor().get_value_or( aMenuFore ) );
style.SetMenuColor( aMenuBack );
style.SetMenuBarColor( aMenuBack );
style.SetMenuHighlightColor( toColor ( qMenuCG.color( QPalette::Highlight ) ) );
diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx
index 67326b05afeb..45d6c5997987 100644
--- a/vcl/win/source/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx
@@ -1517,12 +1517,13 @@ void WinSalGraphics::updateSettingsNative( AllSettings& rSettings )
// FIXME get the color directly from the theme, not from the settings
if( aSalShlData.maVersionInfo.dwMajorVersion >= 6 )
{
+ Color aMenuBarTextColor = aStyleSettings.GetPersonaMenuBarTextColor().get_value_or( aStyleSettings.GetMenuTextColor() );
// in aero menuitem highlight text is drawn in the same color as normal
aStyleSettings.SetMenuHighlightTextColor( aStyleSettings.GetMenuTextColor() );
- aStyleSettings.SetMenuBarRolloverTextColor( aStyleSettings.GetMenuTextColor() );
+ aStyleSettings.SetMenuBarRolloverTextColor( aMenuBarTextColor );
pSVData->maNWFData.mnMenuFormatBorderX = 2;
pSVData->maNWFData.mnMenuFormatBorderY = 2;
- pSVData->maNWFData.maMenuBarHighlightTextColor = aStyleSettings.GetMenuTextColor();
+ pSVData->maNWFData.maMenuBarHighlightTextColor = aMenuBarTextColor;
GetSalData()->mbThemeMenuSupport = TRUE;
}
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index fa664cb948f1..1aa874331fb3 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -2828,8 +2828,16 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
aStyleSettings.SetUseFlatBorders( FALSE );
aStyleSettings.SetUseFlatMenus( FALSE );
aStyleSettings.SetMenuTextColor( ImplWinColorToSal( GetSysColor( COLOR_MENUTEXT ) ) );
- aStyleSettings.SetMenuBarTextColor( ImplWinColorToSal( GetSysColor( COLOR_MENUTEXT ) ) );
- aStyleSettings.SetMenuBarRolloverTextColor( ImplWinColorToSal( GetSysColor( COLOR_HIGHLIGHTTEXT ) ) );
+ if ( boost::optional<Color> aColor = aStyleSettings.GetPersonaMenuBarTextColor() )
+ {
+ aStyleSettings.SetMenuBarTextColor( *aColor );
+ aStyleSettings.SetMenuBarRolloverTextColor( *aColor );
+ }
+ else
+ {
+ aStyleSettings.SetMenuBarTextColor( ImplWinColorToSal( GetSysColor( COLOR_MENUTEXT ) ) );
+ aStyleSettings.SetMenuBarRolloverTextColor( ImplWinColorToSal( GetSysColor( COLOR_HIGHLIGHTTEXT ) ) );
+ }
aStyleSettings.SetActiveColor( ImplWinColorToSal( GetSysColor( COLOR_ACTIVECAPTION ) ) );
aStyleSettings.SetActiveTextColor( ImplWinColorToSal( GetSysColor( COLOR_CAPTIONTEXT ) ) );
aStyleSettings.SetDeactiveColor( ImplWinColorToSal( GetSysColor( COLOR_INACTIVECAPTION ) ) );