[gtk+/wip/baedert/drawing: 59/102] treeviewaccessible: Don't rely on nonexistent style properties



commit 262ab9e79a3f98d6a6f4bcf11dc8543075e564c2
Author: Timm Bäder <mail baedert org>
Date:   Sun Jun 18 12:54:27 2017 +0200

    treeviewaccessible: Don't rely on nonexistent style properties
    
    The expander-size style property has been gone for a long time.

 gtk/a11y/gtktreeviewaccessible.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/a11y/gtktreeviewaccessible.c b/gtk/a11y/gtktreeviewaccessible.c
index 65a68f3..44d68fe 100644
--- a/gtk/a11y/gtktreeviewaccessible.c
+++ b/gtk/a11y/gtktreeviewaccessible.c
@@ -1032,10 +1032,10 @@ gtk_tree_view_accessible_get_cell_area (GtkCellAccessibleParent *parent,
       expander_column = gtk_tree_view_get_expander_column (tree_view);
       if (expander_column == tv_col)
         {
-          gint expander_size;
-          gtk_widget_style_get (widget,
-                                "expander-size", &expander_size,
-                                NULL);
+          /* Values from gtktreeview.c ... */
+#define _TREE_VIEW_EXPANDER_SIZE 16
+#define _TREE_VIEW_HORIZONTAL_SEPARATOR 4
+          gint expander_size = _TREE_VIEW_EXPANDER_SIZE + (_TREE_VIEW_HORIZONTAL_SEPARATOR / 2);
           cell_rect->x += expander_size + EXTRA_EXPANDER_PADDING;
           cell_rect->width -= expander_size + EXTRA_EXPANDER_PADDING;
         }


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