diff --git a/thunar/thunar-details-view.c b/thunar/thunar-details-view.c index 6a47d68d60624072ce4a5e3a5a3d65cd7f372665..2b402b9ff77c05666b7e27c8a25e2607ffa5ef9b 100644 --- a/thunar/thunar-details-view.c +++ b/thunar/thunar-details-view.c @@ -901,12 +901,16 @@ static void thunar_details_view_zoom_level_changed (ThunarDetailsView *details_view) { ThunarColumn column; + gboolean fixed_columns_used = FALSE; _thunar_return_if_fail (THUNAR_IS_DETAILS_VIEW (details_view)); - /* Disable fixed height optimization during resize, since it can mess up the row height */ - if (details_view->fixed_columns) - gtk_tree_view_set_fixed_height_mode (GTK_TREE_VIEW (gtk_bin_get_child (GTK_BIN (details_view))), FALSE); + if (details_view->fixed_columns == TRUE) + fixed_columns_used = TRUE; + + /* Disable fixed column mode during resize, since it can generate graphical glitches */ + if (fixed_columns_used) + thunar_details_view_set_fixed_columns (details_view, FALSE); /* determine the list of tree view columns */ for (column = 0; column < THUNAR_N_VISIBLE_COLUMNS; ++column) @@ -915,8 +919,13 @@ thunar_details_view_zoom_level_changed (ThunarDetailsView *details_view) gtk_tree_view_column_queue_resize (details_view->columns[column]); } - if (details_view->fixed_columns) - gtk_tree_view_set_fixed_height_mode (GTK_TREE_VIEW (gtk_bin_get_child (GTK_BIN (details_view))), TRUE); + if (fixed_columns_used) + { + thunar_details_view_set_fixed_columns (details_view, TRUE); + + /* For unknown reason a reload is required to display the correct row-height (otherwise some rows will keep the old height )*/ + thunar_standard_view_reload (THUNAR_VIEW (details_view), TRUE); + } } @@ -978,6 +987,10 @@ thunar_details_view_set_fixed_columns (ThunarDetailsView *details_view, /* apply the new value */ details_view->fixed_columns = fixed_columns; + /* disable in reverse order, otherwise graphical glitches can appear*/ + if (!fixed_columns) + gtk_tree_view_set_fixed_height_mode (GTK_TREE_VIEW (gtk_bin_get_child (GTK_BIN (details_view))), FALSE); + /* apply the new setting to all columns */ for (column = 0; column < THUNAR_N_VISIBLE_COLUMNS; ++column) { @@ -1001,9 +1014,9 @@ thunar_details_view_set_fixed_columns (ThunarDetailsView *details_view, } /* for fixed columns mode, we can enable the fixed height - * mode to improve the performance of the GtkTreeVeiw. - */ - gtk_tree_view_set_fixed_height_mode (GTK_TREE_VIEW (gtk_bin_get_child (GTK_BIN (details_view))), fixed_columns); + * mode to improve the performance of the GtkTreeVeiw. */ + if (fixed_columns) + gtk_tree_view_set_fixed_height_mode (GTK_TREE_VIEW (gtk_bin_get_child (GTK_BIN (details_view))), TRUE); /* notify listeners */ g_object_notify (G_OBJECT (details_view), "fixed-columns"); diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c index 07b0e9564946943d0fb52d0e31f9afc4a029a005..45a92aafe92d46baf09c7c6c77bd8b95488cc972 100644 --- a/thunar/thunar-standard-view.c +++ b/thunar/thunar-standard-view.c @@ -140,8 +140,6 @@ static ThunarZoomLevel thunar_standard_view_get_zoom_level (Thu static void thunar_standard_view_set_zoom_level (ThunarView *view, ThunarZoomLevel zoom_level); static void thunar_standard_view_reset_zoom_level (ThunarView *view); -static void thunar_standard_view_reload (ThunarView *view, - gboolean reload_info); static gboolean thunar_standard_view_get_visible_range (ThunarView *view, ThunarFile **start_file, ThunarFile **end_file); @@ -1756,7 +1754,7 @@ thunar_standard_view_reset_zoom_level (ThunarView *view) -static void +void thunar_standard_view_reload (ThunarView *view, gboolean reload_info) { diff --git a/thunar/thunar-standard-view.h b/thunar/thunar-standard-view.h index f8513685830c7f6d5ef07550f3724bfdc80c001f..7d7f4f872fe519b7f0a19f7195f4a00c62c85ff0 100644 --- a/thunar/thunar-standard-view.h +++ b/thunar/thunar-standard-view.h @@ -148,6 +148,8 @@ void thunar_standard_view_context_menu (ThunarStandardView *standard_view void thunar_standard_view_queue_popup (ThunarStandardView *standard_view, GdkEventButton *event); +void thunar_standard_view_reload (ThunarView *view, + gboolean reload_info); void thunar_standard_view_selection_changed (ThunarStandardView *standard_view);