[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - vcl/source vcl/unx
Simon Long
simon at raspberrypi.org
Sat Jul 11 12:32:20 PDT 2015
vcl/source/window/menu.cxx | 9 ++++-----
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 8 +++-----
2 files changed, 7 insertions(+), 10 deletions(-)
New commits:
commit 86deb192de0803b5c59a4b07590b3d725f22c089
Author: Simon Long <simon at raspberrypi.org>
Date: Wed Jul 8 13:51:10 2015 +0100
tdf#92243 Read menu highlight text colour correctly from GTK theme
Change-Id: Iade050c8504a1cc65b5ac345141da32898e7ebff
Reviewed-on: https://gerrit.libreoffice.org/16887
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit ae4ec7a75b0048af2fba12953a84fe5b26d89b9a)
Signed-off-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index afe44c6..cb83637 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1853,12 +1853,11 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
rRenderContext.SetTextColor(rSettings.GetMenuBarRolloverTextColor());
else if (bHighlighted)
rRenderContext.SetTextColor(rSettings.GetMenuBarHighlightTextColor());
+ else
+ rRenderContext.SetTextColor(rSettings.GetMenuBarTextColor());
}
- else
- {
- if (bHighlighted)
- rRenderContext.SetTextColor(rSettings.GetMenuHighlightTextColor());
- }
+ else if (bHighlighted)
+ rRenderContext.SetTextColor(rSettings.GetMenuHighlightTextColor());
}
Point aPos(aTopLeft);
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 802e499..0e0331e 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -4049,8 +4049,8 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aTextColor = aStyleSet.GetPersonaMenuBarTextColor().get_value_or( getColor( pMenubarStyle->fg[GTK_STATE_NORMAL] ) );
aStyleSet.SetMenuBarTextColor( aTextColor );
- aStyleSet.SetMenuBarRolloverTextColor( aTextColor );
- aStyleSet.SetMenuBarHighlightTextColor(aStyleSet.GetMenuHighlightTextColor());
+ aStyleSet.SetMenuBarRolloverTextColor(getColor(pMenubarStyle->fg[GTK_STATE_PRELIGHT]));
+ aStyleSet.SetMenuBarHighlightTextColor(getColor(pMenubarStyle->fg[GTK_STATE_SELECTED]));
#if OSL_DEBUG_LEVEL > 1
std::fprintf( stderr, "==\n" );
@@ -4081,9 +4081,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
}
aHighlightColor = getColor( pMenuItemStyle->bg[ GTK_STATE_SELECTED ] );
- aHighlightTextColor = getColor( pMenuTextStyle->fg[ GTK_STATE_PRELIGHT ] );
- if( aHighlightColor == aHighlightTextColor )
- aHighlightTextColor = (aHighlightColor.GetLuminance() < 128) ? Color( COL_WHITE ) : Color( COL_BLACK );
+ aHighlightTextColor = getColor( pMenuItemStyle->fg[ GTK_STATE_SELECTED ] );
aStyleSet.SetMenuHighlightColor( aHighlightColor );
aStyleSet.SetMenuHighlightTextColor( aHighlightTextColor );
More information about the Libreoffice-commits
mailing list