[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Mar 11 14:33:59 UTC 2020


 vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit af4a5ef3afc04d2c5472139e69bf9f56767a20d3
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Mar 11 12:42:01 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Mar 11 15:33:23 2020 +0100

    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 at redhat.com>

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


More information about the Libreoffice-commits mailing list