[gtk+/wip/cosimoc/range-gadget: 34/63] range: simplify code
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/cosimoc/range-gadget: 34/63] range: simplify code
- Date: Sun, 28 Feb 2016 17:28:49 +0000 (UTC)
commit b8f4654cab9da49bbafdf890eea6eed6028c9a66
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Feb 22 18:28:30 2016 -0800
range: simplify code
Now that everything is in the main gadget, we can just let it propagate
drawing to its children.
gtk/gtkrange.c | 17 +++--------------
1 files changed, 3 insertions(+), 14 deletions(-)
---
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 3dcd634..8ed2366 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -2259,6 +2259,8 @@ gtk_range_render_trough (GtkCssGadget *gadget,
if (priv->has_origin)
gtk_css_gadget_draw (priv->highlight_gadget, cr);
+ gtk_css_gadget_draw (priv->slider_gadget, cr);
+
return gtk_widget_has_visible_focus (widget);
}
@@ -2269,20 +2271,7 @@ gtk_range_draw (GtkWidget *widget,
GtkRange *range = GTK_RANGE (widget);
GtkRangePrivate *priv = range->priv;
- gtk_css_gadget_draw (priv->trough_gadget, cr);
- gtk_css_gadget_draw (priv->slider_gadget, cr);
-
- if (priv->stepper_a_gadget)
- gtk_css_gadget_draw (priv->stepper_a_gadget, cr);
-
- if (priv->stepper_b_gadget)
- gtk_css_gadget_draw (priv->stepper_b_gadget, cr);
-
- if (priv->stepper_c_gadget)
- gtk_css_gadget_draw (priv->stepper_c_gadget, cr);
-
- if (priv->stepper_d_gadget)
- gtk_css_gadget_draw (priv->stepper_d_gadget, cr);
+ gtk_css_gadget_draw (priv->gadget, cr);
return GDK_EVENT_PROPAGATE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]