mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 06:10:15 +00:00
range: simplify code a bit
This commit is contained in:
parent
d19215015e
commit
83a6471c4e
@ -1898,8 +1898,10 @@ gtk_range_size_allocate (GtkWidget *widget,
|
|||||||
GtkRangePrivate *priv = range->priv;
|
GtkRangePrivate *priv = range->priv;
|
||||||
GtkAllocation clip, trough_clip, slider_clip, stepper_clip;
|
GtkAllocation clip, trough_clip, slider_clip, stepper_clip;
|
||||||
GtkAllocation slider_alloc, stepper_alloc;
|
GtkAllocation slider_alloc, stepper_alloc;
|
||||||
|
gint baseline;
|
||||||
|
|
||||||
gtk_widget_set_allocation (widget, allocation);
|
gtk_widget_set_allocation (widget, allocation);
|
||||||
|
baseline = gtk_widget_get_allocated_baseline (widget);
|
||||||
|
|
||||||
if (gtk_widget_get_realized (widget))
|
if (gtk_widget_get_realized (widget))
|
||||||
gdk_window_move_resize (priv->event_window,
|
gdk_window_move_resize (priv->event_window,
|
||||||
@ -1915,7 +1917,7 @@ gtk_range_size_allocate (GtkWidget *widget,
|
|||||||
|
|
||||||
gtk_css_gadget_allocate (priv->slider_gadget,
|
gtk_css_gadget_allocate (priv->slider_gadget,
|
||||||
&slider_alloc,
|
&slider_alloc,
|
||||||
gtk_widget_get_allocated_baseline (widget),
|
baseline,
|
||||||
&slider_clip);
|
&slider_clip);
|
||||||
|
|
||||||
gtk_range_allocate_trough (range, &trough_clip);
|
gtk_range_allocate_trough (range, &trough_clip);
|
||||||
@ -1929,7 +1931,7 @@ gtk_range_size_allocate (GtkWidget *widget,
|
|||||||
|
|
||||||
gtk_css_gadget_allocate (priv->stepper_a_gadget,
|
gtk_css_gadget_allocate (priv->stepper_a_gadget,
|
||||||
&stepper_alloc,
|
&stepper_alloc,
|
||||||
gtk_widget_get_allocated_baseline (widget),
|
baseline,
|
||||||
&stepper_clip);
|
&stepper_clip);
|
||||||
gdk_rectangle_union (&clip, &stepper_clip, &clip);
|
gdk_rectangle_union (&clip, &stepper_clip, &clip);
|
||||||
}
|
}
|
||||||
@ -1942,7 +1944,7 @@ gtk_range_size_allocate (GtkWidget *widget,
|
|||||||
|
|
||||||
gtk_css_gadget_allocate (priv->stepper_b_gadget,
|
gtk_css_gadget_allocate (priv->stepper_b_gadget,
|
||||||
&stepper_alloc,
|
&stepper_alloc,
|
||||||
gtk_widget_get_allocated_baseline (widget),
|
baseline,
|
||||||
&stepper_clip);
|
&stepper_clip);
|
||||||
gdk_rectangle_union (&clip, &stepper_clip, &clip);
|
gdk_rectangle_union (&clip, &stepper_clip, &clip);
|
||||||
}
|
}
|
||||||
@ -1955,7 +1957,7 @@ gtk_range_size_allocate (GtkWidget *widget,
|
|||||||
|
|
||||||
gtk_css_gadget_allocate (priv->stepper_c_gadget,
|
gtk_css_gadget_allocate (priv->stepper_c_gadget,
|
||||||
&stepper_alloc,
|
&stepper_alloc,
|
||||||
gtk_widget_get_allocated_baseline (widget),
|
baseline,
|
||||||
&stepper_clip);
|
&stepper_clip);
|
||||||
gdk_rectangle_union (&clip, &stepper_clip, &clip);
|
gdk_rectangle_union (&clip, &stepper_clip, &clip);
|
||||||
}
|
}
|
||||||
@ -1968,7 +1970,7 @@ gtk_range_size_allocate (GtkWidget *widget,
|
|||||||
|
|
||||||
gtk_css_gadget_allocate (priv->stepper_d_gadget,
|
gtk_css_gadget_allocate (priv->stepper_d_gadget,
|
||||||
&stepper_alloc,
|
&stepper_alloc,
|
||||||
gtk_widget_get_allocated_baseline (widget),
|
baseline,
|
||||||
&stepper_clip);
|
&stepper_clip);
|
||||||
gdk_rectangle_union (&clip, &stepper_clip, &clip);
|
gdk_rectangle_union (&clip, &stepper_clip, &clip);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user