summaryrefslogtreecommitdiff
path: root/thunar/thunar-abstract-icon-view.c
diff options
context:
space:
mode:
authorAndre Miranda <andreldm@xfce.org>2018-03-27 20:31:53 -0300
committerAndre Miranda <andreldm@xfce.org>2018-03-27 20:31:53 -0300
commit375bc4075873054820b75f296578a5e312087da8 (patch)
tree2bb6bdb1110876586f2111cafa91b6baf8cafd0f /thunar/thunar-abstract-icon-view.c
parentd464b6d87e2b0cd558b74f5513adb6008a541e35 (diff)
downloadthunar-375bc4075873054820b75f296578a5e312087da8.tar.gz
Avoid unexpected overshoot fade on icon view
Diffstat (limited to 'thunar/thunar-abstract-icon-view.c')
-rw-r--r--thunar/thunar-abstract-icon-view.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/thunar/thunar-abstract-icon-view.c b/thunar/thunar-abstract-icon-view.c
index 2267d4ad..82cddf06 100644
--- a/thunar/thunar-abstract-icon-view.c
+++ b/thunar/thunar-abstract-icon-view.c
@@ -92,6 +92,9 @@ static void thunar_abstract_icon_view_item_activated (ExoIconView
static void thunar_abstract_icon_view_sort_column_changed (GtkTreeSortable *sortable,
ThunarAbstractIconView *abstract_icon_view);
static void thunar_abstract_icon_view_zoom_level_changed (ThunarAbstractIconView *abstract_icon_view);
+static void thunar_abstract_icon_view_size_allocate (ThunarAbstractIconView *abstract_icon_view,
+ GtkAllocation *allocation,
+ GtkWidget *view);
@@ -245,6 +248,11 @@ thunar_abstract_icon_view_init (ThunarAbstractIconView *abstract_icon_view)
g_signal_connect (G_OBJECT (THUNAR_STANDARD_VIEW (abstract_icon_view)->model), "sort-column-changed",
G_CALLBACK (thunar_abstract_icon_view_sort_column_changed), abstract_icon_view);
thunar_abstract_icon_view_sort_column_changed (GTK_TREE_SORTABLE (THUNAR_STANDARD_VIEW (abstract_icon_view)->model), abstract_icon_view);
+
+ /* update the icon view on size-allocate events */
+ g_signal_connect_after (G_OBJECT (abstract_icon_view), "size-allocate",
+ G_CALLBACK (thunar_abstract_icon_view_size_allocate),
+ view);
}
@@ -785,3 +793,13 @@ thunar_abstract_icon_view_zoom_level_changed (ThunarAbstractIconView *abstract_i
THUNAR_STANDARD_VIEW (abstract_icon_view)->icon_renderer,
NULL, NULL, NULL);
}
+
+
+
+static void
+thunar_abstract_icon_view_size_allocate (ThunarAbstractIconView *abstract_icon_view,
+ GtkAllocation *allocation,
+ GtkWidget *view)
+{
+ gtk_widget_queue_resize (view);
+}