[nautilus] list-view: use filename column width for rename popover position



commit f03ab5c8e145307dff914ee8334e475d83c8d46d
Author: andreas reis gmail com <andreas reis gmail com>
Date:   Sat Sep 12 13:54:00 2015 +0000

    list-view: use filename column width for rename popover position
    
    It's still not ideal, since we would like to be on the middle of the
    label. But is better than what we have... (and hopefully we will
    have listbox for next release and this shouldn't be a problem)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754620

 src/nautilus-list-view.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 369090c..50e76a4 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -3324,10 +3324,10 @@ nautilus_list_view_compute_rename_popover_relative_to (NautilusFilesView *view)
         if (list_view->details->last_event_button_x > 0) {
                 rect->x = list_view->details->last_event_button_x;
         }  else {
-                rect->x = CLAMP (gtk_widget_get_allocated_width (GTK_WIDGET (tree_view)) * 0.5 -
+                rect->x = CLAMP (gtk_tree_view_column_get_width (list_view->details->file_name_column) * 0.5 
-
                                  RENAME_POPOVER_RELATIVE_TO_RECTANGLE_WIDTH * 0.5,
                                  0,
-                                 gtk_widget_get_allocated_width (GTK_WIDGET (tree_view)) -
+                                 gtk_tree_view_column_get_width (list_view->details->file_name_column) -
                                  RENAME_POPOVER_RELATIVE_TO_RECTANGLE_WIDTH);
         }
         rect->width = RENAME_POPOVER_RELATIVE_TO_RECTANGLE_WIDTH;


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