range: Simplify highlight allocation

Since we are really only interested in the center point of the
slider allocation, the pre-computed slider geometry is perfectly
fine, just use it always. This avoids the complication with
gadget visibility.
This commit is contained in:
Matthias Clasen 2016-03-26 13:50:42 -04:00
parent e33188ad41
commit 7fe1037e84

View File

@ -2006,8 +2006,6 @@ gtk_range_allocate_trough (GtkCssGadget *gadget,
{
GtkAllocation highlight_alloc, highlight_clip;
if (gtk_css_gadget_get_visible (priv->slider_gadget))
gtk_css_gadget_get_content_allocation (priv->slider_gadget, &slider_alloc, NULL);
highlight_alloc = *allocation;
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)