[gtk+/wip/baedert/meson] range: Set stepper style classes according to orientation
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/meson] range: Set stepper style classes according to orientation
- Date: Tue, 23 Aug 2016 06:21:44 +0000 (UTC)
commit 3ab17475298acc42093d7c0ce8527a04db5dd1d3
Author: Timm Bäder <mail baedert org>
Date: Mon Aug 22 22:08:03 2016 +0200
range: Set stepper style classes according to orientation
https://bugzilla.gnome.org/show_bug.cgi?id=769498
gtk/gtkrange.c | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
---
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index c124ca2..32c71a7 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -3991,33 +3991,30 @@ _gtk_range_set_steppers (GtkRange *range,
gboolean has_d)
{
GtkRangePrivate *priv = range->priv;
+ gboolean vertical = (priv->orientation == GTK_ORIENTATION_VERTICAL);
sync_stepper_gadget (range,
has_a, &priv->stepper_a_gadget,
- "up",
- priv->orientation == GTK_ORIENTATION_VERTICAL ?
- GTK_CSS_IMAGE_BUILTIN_ARROW_UP : GTK_CSS_IMAGE_BUILTIN_ARROW_LEFT,
+ vertical ? "up" : "left",
+ vertical ? GTK_CSS_IMAGE_BUILTIN_ARROW_UP : GTK_CSS_IMAGE_BUILTIN_ARROW_LEFT,
NULL);
sync_stepper_gadget (range,
has_b, &priv->stepper_b_gadget,
- "down",
- priv->orientation == GTK_ORIENTATION_VERTICAL ?
- GTK_CSS_IMAGE_BUILTIN_ARROW_DOWN : GTK_CSS_IMAGE_BUILTIN_ARROW_RIGHT,
+ vertical ? "down" : "right",
+ vertical ? GTK_CSS_IMAGE_BUILTIN_ARROW_DOWN : GTK_CSS_IMAGE_BUILTIN_ARROW_RIGHT,
priv->stepper_a_gadget);
sync_stepper_gadget (range,
has_c, &priv->stepper_c_gadget,
- "up",
- priv->orientation == GTK_ORIENTATION_VERTICAL ?
- GTK_CSS_IMAGE_BUILTIN_ARROW_UP : GTK_CSS_IMAGE_BUILTIN_ARROW_LEFT,
+ vertical ? "up" : "left",
+ vertical ? GTK_CSS_IMAGE_BUILTIN_ARROW_UP : GTK_CSS_IMAGE_BUILTIN_ARROW_LEFT,
priv->trough_gadget);
sync_stepper_gadget (range,
has_d, &priv->stepper_d_gadget,
- "down",
- priv->orientation == GTK_ORIENTATION_VERTICAL ?
- GTK_CSS_IMAGE_BUILTIN_ARROW_DOWN : GTK_CSS_IMAGE_BUILTIN_ARROW_RIGHT,
+ vertical ? "down" : "right",
+ vertical ? GTK_CSS_IMAGE_BUILTIN_ARROW_DOWN : GTK_CSS_IMAGE_BUILTIN_ARROW_RIGHT,
priv->stepper_c_gadget ? priv->stepper_c_gadget : priv->trough_gadget);
gtk_widget_queue_resize (GTK_WIDGET (range));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]