[gtk+/wip/baedert/drawing: 43/66] scrolledwindow: fix scrollbar allocation



commit 1ab804e01a302d3377633256b0575fc2dce9d2ef
Author: Timm Bäder <mail baedert org>
Date:   Tue May 30 13:32:37 2017 +0200

    scrolledwindow: fix scrollbar allocation

 gtk/gtkscrolledwindow.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index f24df8b..e48a6e6 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -1079,21 +1079,14 @@ event_close_to_indicator (GtkScrolledWindow *sw,
 {
   GtkScrolledWindowPrivate *priv;
   GtkAllocation indicator_alloc;
-  GtkAllocation sw_alloc;
   gdouble x, y;
   gint distance;
 
   priv = sw->priv;
 
-  gtk_widget_get_allocation (GTK_WIDGET (sw), &sw_alloc);
   gtk_widget_get_allocation (indicator->scrollbar, &indicator_alloc);
   gdk_event_get_coords (event, &x, &y);
 
-  /* Make indicator alloc relative to scrolledwindow alloc, which is also
-   * what the event coords are relative to */
-  indicator_alloc.x -= sw_alloc.x;
-  indicator_alloc.y -= sw_alloc.y;
-
   if (indicator->over)
     distance = INDICATOR_FAR_DISTANCE;
   else
@@ -3047,7 +3040,7 @@ gtk_scrolled_window_allocate_scrollbar (GtkScrolledWindow *scrolled_window,
 
   priv = scrolled_window->priv;
 
-  gtk_scrolled_window_inner_allocation (widget, &content_allocation, FALSE);
+  gtk_scrolled_window_inner_allocation (widget, &content_allocation, TRUE);
   gtk_widget_measure (priv->vscrollbar, GTK_ORIENTATION_HORIZONTAL, -1,
                       &sb_width, NULL, NULL, NULL);
   gtk_widget_measure (priv->hscrollbar, GTK_ORIENTATION_VERTICAL, -1,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]