diff options
author | Timm Bäder <mail@baedert.org> | 2017-06-30 13:10:32 +0200 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2017-07-19 21:27:15 -0400 |
commit | 468e75e43da0c9f227d046fa23fe728a5f2bcec1 (patch) | |
tree | 97169f4b63890eb1be0b441743b054ad8e42daef /gtk/gtkrange.c | |
parent | ed5b7fedb860fae7ebd72ee83cf3a02fe88ca454 (diff) | |
download | gtk+-468e75e43da0c9f227d046fa23fe728a5f2bcec1.tar.gz |
range: Fix mark positions
The values returned by gtk_range_compute_slider_position are relative
to the trough_widget (the slider's parent), not the slider widget
itself.
Diffstat (limited to 'gtk/gtkrange.c')
-rw-r--r-- | gtk/gtkrange.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index 2c4d20899d..0a5fbc13bb 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -1760,7 +1760,6 @@ range_grab_add (GtkRange *range, * is the only widget receiving the pointer events. */ priv->grab_location = location; - gtk_widget_queue_resize (location); update_trough_state (range); update_slider_state (range); @@ -1795,7 +1794,6 @@ range_grab_remove (GtkRange *range) context = gtk_widget_get_style_context (GTK_WIDGET (range)); - gtk_widget_queue_resize (priv->grab_location); priv->grab_location = NULL; gtk_range_update_mouse_location (range); @@ -2910,7 +2908,7 @@ gtk_range_calc_marks (GtkRange *range) for (i = 0; i < priv->n_marks; i++) { gtk_range_compute_slider_position (range, priv->marks[i], &slider); - gtk_widget_translate_coordinates (priv->slider_widget, GTK_WIDGET (range), + gtk_widget_translate_coordinates (priv->trough_widget, GTK_WIDGET (range), slider.x, slider.y, &slider.x, &slider.y); if (priv->orientation == GTK_ORIENTATION_HORIZONTAL) |