forked from AuroraMiddleware/gtk
Revert "treeview: respect expander-size style property"
This reverts commit d6a29e1b8c
.
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
This commit is contained in:
parent
011dcf828b
commit
0494090afa
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user