summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-03-11 12:42:01 +0000
committerMiklos Vajna <vmiklos@collabora.com>2020-03-17 11:25:43 +0100
commit62c45dfbbee1c43aebaa020b5aa18f1271fd0ea1 (patch)
tree65136a0d4f367ef654c5b73bc3b110ecd365fd80
parent3bd5de707a361fc23d53dd5ad76c147722dfa2e9 (diff)
mysterious greyed out native toggle buttons when in foreground
and flipping to normal mode when in background. Change-Id: I100efb651515b044d56a8c3838569cf717b37d51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90279 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index 5680ddf71bc2..716d5316203a 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -3057,11 +3057,14 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings)
pos = gtk_widget_path_append_type (pCPath, GTK_TYPE_LABEL);
gtk_widget_path_iter_add_class(pCPath, pos, GTK_STYLE_CLASS_LABEL);
GtkStyleContext *pCStyle = makeContext (pCPath, nullptr);
+ aContextState.save(pCStyle);
GdkRGBA tooltip_bg_color, tooltip_fg_color;
style_context_set_state(pCStyle, GTK_STATE_FLAG_NORMAL);
gtk_style_context_get_color(pCStyle, gtk_style_context_get_state(pCStyle), &tooltip_fg_color);
gtk_style_context_get_background_color(pCStyle, gtk_style_context_get_state(pCStyle), &tooltip_bg_color);
+
+ aContextState.restore();
g_object_unref( pCStyle );
aStyleSet.SetHelpColor( getColor( tooltip_bg_color ));
@@ -3074,6 +3077,7 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings)
gtk_widget_path_append_type( pCPath, GTK_TYPE_TEXT_VIEW );
gtk_widget_path_iter_add_class( pCPath, -1, GTK_STYLE_CLASS_VIEW );
GtkStyleContext *pCStyle = makeContext( pCPath, nullptr );
+ aContextState.save(pCStyle);
// highlighting colors
style_context_set_state(pCStyle, GTK_STATE_FLAG_SELECTED);
@@ -3113,6 +3117,7 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings)
aShadowColor.DecreaseLuminance(64);
aStyleSet.SetShadowColor(aShadowColor);
+ aContextState.restore();
g_object_unref( pCStyle );
// Tab colors