[gtk+/wip/baedert/drawing: 100/183] scale: Fix value position
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/drawing: 100/183] scale: Fix value position
- Date: Sat, 20 May 2017 13:24:54 +0000 (UTC)
commit 5239072f623f5fc3882a93eb4736b247d4a2b98a
Author: Timm Bäder <mail baedert org>
Date: Fri May 5 18:07:19 2017 +0200
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 be37558..c6fc149 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -3723,9 +3723,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 98456a6..a3d35b3 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 bde4a8b..3849eac 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]