[gtk/1464-tree-view-expander-arrows-no-longer-positioned-vertically-centered-correctly] Revert "treeview: respect expander-size style property"



commit 0494090afa18453061461f0f50d06b91749416ee
Author: António Fernandes <antoniof gnome org>
Date:   Thu Feb 13 19:32:37 2020 +0000

    Revert "treeview: respect expander-size style property"
    
    This reverts commit d6a29e1b8cb815a2dfc00cd17681ef13e0487a27.
    
    It fixed blurry rendering of expander arrows.
    
    However, it also introduced a regression in that the arrows are no
    longer vertically centered if rows are taller than twice the
    expander-size style property.
    
    Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1464

 gtk/gtktreeview.c | 17 -----------------
 1 file changed, 17 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 1407a8e96a..f857c623cd 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -10329,13 +10329,11 @@ gtk_tree_view_draw_arrow (GtkTreeView *tree_view,
   gint x2;
   gint vertical_separator;
   GtkCellRendererState flags = 0;
-  gint expander_size;
 
   widget = GTK_WIDGET (tree_view);
   context = gtk_widget_get_style_context (widget);
 
   gtk_widget_style_get (widget,
-                        "expander-size", &expander_size,
                         "vertical-separator", &vertical_separator,
                         NULL);
 
@@ -10370,21 +10368,6 @@ gtk_tree_view_draw_arrow (GtkTreeView *tree_view,
   gtk_style_context_set_state (context, state);
   gtk_style_context_add_class (context, GTK_STYLE_CLASS_EXPANDER);
 
-  if (expander_size > 0)
-    {
-      if (expander_size < area.width && area.width % expander_size != 0)
-        {
-          area.x += (area.width % expander_size) / 2;
-          area.width = expander_size;
-        }
-
-      if (expander_size < area.height && area.height % expander_size != 0)
-        {
-          area.y += (area.height % expander_size) / 2;
-          area.height = expander_size;
-        }
-    }
-
   gtk_render_expander (context, cr,
                        area.x, area.y,
                        area.width, area.height);


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