[gnumeric] GUI: Restore rendering for old gtk.



commit cf997547281d31ed11d7d4c5f268bca3969354e5
Author: Morten Welinder <terra gnome org>
Date:   Wed May 4 07:32:51 2016 -0400

    GUI: Restore rendering for old gtk.

 src/item-bar.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/item-bar.c b/src/item-bar.c
index 758ffa9..a296afa 100644
--- a/src/item-bar.c
+++ b/src/item-bar.c
@@ -340,7 +340,9 @@ ib_draw_cell (GnmItemBar const * const ib, cairo_t *cr,
        cairo_save (cr);
 
        gtk_style_context_save (ctxt);
-       //gtk_style_context_set_state (ctxt, selection_type_flags[type]);
+#if !GTK_CHECK_VERSION(3,20,0)
+       gtk_style_context_set_state (ctxt, selection_type_flags[type]);
+#endif
        gtk_render_background (ctxt, cr, rect->x, rect->y,
                               rect->width + 1, rect->height + 1);
 
@@ -1204,6 +1206,13 @@ gnm_item_bar_init (GnmItemBar *ib)
        ib->has_resize_guides = FALSE;
        ib->pango.item = NULL;
        ib->pango.glyphs = pango_glyph_string_new ();
+
+#if !GTK_CHECK_VERSION(3,20,0)
+       /* Style-wise we are a button.  */
+       gtk_style_context_add_class
+               (goc_item_get_style_context (GOC_ITEM (ib)),
+                GTK_STYLE_CLASS_BUTTON);
+#endif
 }
 
 static void


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