diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-03-11 12:42:01 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-03-11 15:33:23 +0100 |
commit | af4a5ef3afc04d2c5472139e69bf9f56767a20d3 (patch) | |
tree | 573f5f35894bf5a9ac46f374f37a1f858500eed6 /vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | |
parent | ae363d50397ac1a7b49f42706109fd83fa809fcc (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/+/90328
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx')
-rw-r--r-- | vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index 1a1a334d1439..3a8297b3ab52 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -3064,11 +3064,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 )); @@ -3081,6 +3084,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); @@ -3120,6 +3124,7 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings) aShadowColor.DecreaseLuminance(64); aStyleSet.SetShadowColor(aShadowColor); + aContextState.restore(); g_object_unref( pCStyle ); // Tab colors |