[gtk/matthiasc/for-master: 1/7] columnview: Fix some issues with column resizing




commit a88e5a5f4ec0338735fb74d0308ebcbda9647433
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Oct 19 08:25:09 2020 -0400

    columnview: Fix some issues with column resizing
    
    Ensure that we place the resize rectangle at the visible
    right edge of the column, not where the allocation ends
    (we clip the header drawing, after all).
    
    Related: #3274

 gtk/gtkcolumnview.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gtk/gtkcolumnview.c b/gtk/gtkcolumnview.c
index d2b73fe105..f983f7c03b 100644
--- a/gtk/gtkcolumnview.c
+++ b/gtk/gtkcolumnview.c
@@ -862,12 +862,16 @@ gtk_column_view_in_resize_rect (GtkColumnView       *self,
 {
   GtkWidget *header;
   graphene_rect_t rect;
+  int width;
 
   header = gtk_column_view_column_get_header (column);
 
   if (!gtk_widget_compute_bounds (header, self->header, &rect))
     return FALSE;
 
+  gtk_column_view_column_get_allocation (column, NULL, &width);
+  rect.size.width = width;
+
   rect.origin.x += rect.size.width - DRAG_WIDTH / 2;
   rect.size.width = DRAG_WIDTH;
 


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