summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreas.reis@gmail.com <andreas.reis@gmail.com>2015-09-12 13:54:00 +0000
committerCarlos Soriano <csoriano@gnome.org>2015-09-22 23:29:29 +0200
commitf03ab5c8e145307dff914ee8334e475d83c8d46d (patch)
treef44719dcd2a348a0dc9e91973924eb4a4049f051
parent4b6c6adb23481eb62def85655321c1315d42d9b8 (diff)
downloadnautilus-f03ab5c8e145307dff914ee8334e475d83c8d46d.tar.gz
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
-rw-r--r--src/nautilus-list-view.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 369090c8c..50e76a44f 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;