[gnumeric] GUI: Dead kittens.



commit 9e4cfd461b48038e6e03adee1550f26596bd229d
Author: Morten Welinder <terra gnome org>
Date:   Sun May 1 20:31:07 2016 -0400

    GUI: Dead kittens.

 src/gui-util.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/gui-util.c b/src/gui-util.c
index e8abef6..3dd0010 100644
--- a/src/gui-util.c
+++ b/src/gui-util.c
@@ -1270,7 +1270,12 @@ gnm_widget_measure_string (GtkWidget *w, const char *s)
 
        ctxt = gtk_widget_get_style_context (w);
 
+       // As-of gtk+ 3.20 we have to set the context state to the state
+       // we are querying for.  This ought to work before gtk+ 3.20 too.
+       gtk_style_context_save (ctxt);
+       gtk_style_context_set_state (ctxt, state);
        gtk_style_context_get (ctxt, state, "font", &desc, NULL);
+       gtk_style_context_restore (ctxt);
 
        len = go_pango_measure_string
                (gtk_widget_get_pango_context (w), desc, s);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]