From 1d782b893032bb048e024ef182def1932ac3cbd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 5 May 2017 18:07:19 +0200 Subject: [PATCH] scale: Fix value position by not using the range's gadget which is not allocated to any position anymore. --- gtk/gtkrange.c | 6 ------ gtk/gtkrangeprivate.h | 1 - gtk/gtkscale.c | 5 ++--- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index 18fec60298..b59171abbe 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -3654,9 +3654,3 @@ gtk_range_get_slider_gadget (GtkRange *range) { return range->priv->slider_gadget; } - -GtkCssGadget * -gtk_range_get_gadget (GtkRange *range) -{ - return range->priv->gadget; -} diff --git a/gtk/gtkrangeprivate.h b/gtk/gtkrangeprivate.h index 98456a602f..a3d35b361f 100644 --- a/gtk/gtkrangeprivate.h +++ b/gtk/gtkrangeprivate.h @@ -50,7 +50,6 @@ void _gtk_range_set_steppers (GtkRange *range gboolean has_d); GtkCssGadget *gtk_range_get_slider_gadget (GtkRange *range); -GtkCssGadget *gtk_range_get_gadget (GtkRange *range); G_END_DECLS diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c index bde4a8bbb4..3849eac62f 100644 --- a/gtk/gtkscale.c +++ b/gtk/gtkscale.c @@ -291,11 +291,10 @@ gtk_scale_allocate_value (GtkScale *scale, GtkScalePrivate *priv = scale->priv; GtkWidget *widget = GTK_WIDGET (scale); GtkRange *range = GTK_RANGE (widget); - GtkCssGadget *range_gadget, *slider_gadget; + GtkCssGadget *slider_gadget; GtkAllocation range_alloc, slider_alloc, value_alloc; - range_gadget = gtk_range_get_gadget (range); - gtk_css_gadget_get_margin_allocation (range_gadget, &range_alloc, NULL); + gtk_widget_get_margin_allocation (widget, &range_alloc); slider_gadget = gtk_range_get_slider_gadget (range); gtk_css_gadget_get_border_allocation (slider_gadget, &slider_alloc, NULL);