summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-11-06 22:24:20 -0500
committerMatthias Clasen <mclasen@redhat.com>2015-11-06 22:27:31 -0500
commitd25e0657be84a72a8fc08dfb329d78b693934b3b (patch)
tree10e72598973ff9f5c20de966e1271c3e19a96ccc
parent60c7893c1445ac378a564e7342368f0dec73e61b (diff)
downloadgtk+-d25e0657be84a72a8fc08dfb329d78b693934b3b.tar.gz
range: Fixes to the new trough rendering
There was an errant y that caused some troughs to not be drawn. And also set the state of the fill node.
-rw-r--r--gtk/gtkrange.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 247d3a8287..c87ad179f2 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -1859,6 +1859,8 @@ update_trough_state (GtkRange *range)
gtk_css_node_set_state (priv->trough_node, state);
if (priv->highlight_node)
gtk_css_node_set_state (priv->highlight_node, state);
+ if (priv->fill_node)
+ gtk_css_node_set_state (priv->fill_node, state);
}
static void
@@ -2030,7 +2032,7 @@ gtk_range_draw (GtkWidget *widget,
gtk_style_context_get_margin (context, gtk_style_context_get_state (context), &margin);
x += margin.left;
- y += y + margin.top;
+ y += margin.top;
width -= margin.left + margin.right;
height -= margin.top + margin.bottom;