summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-11-17 13:04:58 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-11-17 13:07:26 +0000
commitb79cf88a048e5d8c784c97d99155104aef3d5dca (patch)
tree88532121bba991ab9a924f4dda6834ec60b7731c /vcl/unx
parent46f544fa4b9ce43d3c44be1f12ff0d85d12bdb0e (diff)
Resolves: tdf#87960 add and use a ToolFontColor for toolbar item entries
instead of using the MenuBar text color, cause for Ambiance theme the menubar is dark and its font is light, while the toolbars can be light, so light font on light bg appears greyed out Change-Id: I0fa4ab8eabdd3cd69eb682e5ddba8314b8c9ff0f
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk/salnativewidgets-gtk.cxx6
-rw-r--r--vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx10
-rw-r--r--vcl/unx/kde/salnativewidgets-kde.cxx1
-rw-r--r--vcl/unx/kde4/KDESalFrame.cxx1
4 files changed, 16 insertions, 2 deletions
diff --git a/vcl/unx/gtk/salnativewidgets-gtk.cxx b/vcl/unx/gtk/salnativewidgets-gtk.cxx
index 2424ec333617..5c70c1eb062a 100644
--- a/vcl/unx/gtk/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/salnativewidgets-gtk.cxx
@@ -3913,6 +3913,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
// get the widgets in place
NWEnsureGTKMenu( m_nXScreen );
NWEnsureGTKMenubar( m_nXScreen );
+ NWEnsureGTKToolbar( m_nXScreen );
NWEnsureGTKScrollbars( m_nXScreen );
NWEnsureGTKEditBox( m_nXScreen );
NWEnsureGTKTooltip( m_nXScreen );
@@ -4009,7 +4010,6 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
GtkStyle* pMenuItemStyle = gtk_rc_get_style( gWidgetData[m_nXScreen].gMenuItemMenuWidget );
GtkStyle* pMenubarStyle = gtk_rc_get_style( gWidgetData[m_nXScreen].gMenubarWidget );
GtkStyle* pMenuTextStyle = gtk_rc_get_style( gtk_bin_get_child( GTK_BIN(gWidgetData[m_nXScreen].gMenuItemMenuWidget) ) );
-
aBackColor = getColor( pMenubarStyle->bg[GTK_STATE_NORMAL] );
aStyleSet.SetMenuBarColor( aBackColor );
aStyleSet.SetMenuBarRolloverColor( aBackColor );
@@ -4023,6 +4023,10 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetMenuBarRolloverTextColor(getColor(pMenubarStyle->fg[GTK_STATE_PRELIGHT]));
aStyleSet.SetMenuBarHighlightTextColor(getColor(pMenubarStyle->fg[GTK_STATE_SELECTED]));
+ // toolbar colors
+ GtkStyle* pToolbarButtonStyle = gtk_rc_get_style( gWidgetData[m_nXScreen].gToolbarButtonWidget );
+ aStyleSet.SetToolTextColor(getColor(pToolbarButtonStyle->fg[GTK_STATE_NORMAL]));
+
#if OSL_DEBUG_LEVEL > 1
std::fprintf( stderr, "==\n" );
std::fprintf( stderr, "MenuColor = %x (%d)\n", (int)aStyleSet.GetMenuColor().GetColor(), aStyleSet.GetMenuColor().GetLuminance() );
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index 908df09a4db3..86e039cca0aa 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -2488,7 +2488,6 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetAppFont( aFont );
aStyleSet.SetHelpFont( aFont );
aStyleSet.SetMenuFont( aFont );
- aStyleSet.SetToolFont( aFont );
aStyleSet.SetLabelFont( aFont );
aStyleSet.SetRadioCheckFont( aFont );
aStyleSet.SetPushButtonFont( aFont );
@@ -2634,6 +2633,15 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetTabFont(getFont(mpNotebookHeaderTabsTabLabelStyle, rSettings.GetUILanguageTag().getLocale()));
}
+ {
+ GtkStyleContext *pCStyle = mpToolButtonStyle;
+ style_context_set_state(pCStyle, GTK_STATE_FLAG_NORMAL);
+ gtk_style_context_get_color(pCStyle, gtk_style_context_get_state(pCStyle), &text_color);
+ aTextColor = getColor( text_color );
+ aStyleSet.SetToolTextColor(aTextColor);
+ aStyleSet.SetToolFont(getFont(mpToolButtonStyle, rSettings.GetUILanguageTag().getLocale()));
+ }
+
// mouse over text colors
{
GtkStyleContext *pCStyle = mpNotebookHeaderTabsTabHoverLabelStyle;
diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx
index 7fff8dfa26e1..de55f1bb05d3 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -1914,6 +1914,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
aStyleSettings.SetFieldTextColor( aText );
aStyleSettings.SetFieldRolloverTextColor( aText );
aStyleSettings.SetWindowTextColor( aText );
+ aStyleSettings.SetToolTextColor( aText );
aStyleSettings.SetHelpTextColor( aText );
// Base
diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx
index be38c5908799..06a0abd7b9bc 100644
--- a/vcl/unx/kde4/KDESalFrame.cxx
+++ b/vcl/unx/kde4/KDESalFrame.cxx
@@ -233,6 +233,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
style.SetFieldTextColor( aText );
style.SetFieldRolloverTextColor( aText );
style.SetWindowTextColor( aText );
+ style.SetToolTextColor( aText );
// Base
style.SetFieldColor( aBase );