diff options
author | Alexander Schwinn <alexxcons@xfce.org> | 2020-12-12 23:49:58 +0100 |
---|---|---|
committer | Alexander Schwinn <alexxcons@xfce.org> | 2020-12-13 23:36:32 +0100 |
commit | e2df02f82084f14bbd75700b5d992d6d1b444786 (patch) | |
tree | 0a3ba54b849d7485d658a1a4cdd517d846b0bcdf | |
parent | 04711f98ff39e64981cd7e984ae6fb616fd6db7f (diff) | |
download | thunar-e2df02f82084f14bbd75700b5d992d6d1b444786.tar.gz |
Wrap box around spinner to prevent flickering (Issue #440)
Fixes #440
-rw-r--r-- | thunar/thunar-window.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c index 354a2dca..4acce475 100644 --- a/thunar/thunar-window.c +++ b/thunar/thunar-window.c @@ -600,6 +600,7 @@ thunar_window_init (ThunarWindow *window) { GtkWidget *label; GtkWidget *infobar; + GtkWidget *spinner_box; gboolean last_menubar_visible; gchar *last_location_bar; gchar *last_side_pane; @@ -708,9 +709,16 @@ thunar_window_init (ThunarWindow *window) gtk_widget_set_hexpand (window->menubar, TRUE); gtk_grid_attach (GTK_GRID (window->grid), window->menubar, 0, 0, 1, 1); - /* Add a spinner besides the menubar */ + /* Add a spinner besides the menubar + * Putting the spinner directly into the grid for unknown reason can lead to flickering + * That is why we wrap a box around the spinner. + * Check https://gitlab.xfce.org/xfce/thunar/-/issues/440 for details + */ window->spinner = gtk_spinner_new (); - gtk_grid_attach (GTK_GRID (window->grid), window->spinner, 1, 0, 1, 1); + spinner_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); + gtk_widget_show (spinner_box); + gtk_container_add (GTK_CONTAINER (spinner_box), window->spinner); + gtk_grid_attach (GTK_GRID (window->grid), spinner_box, 1, 0, 1, 1); exo_binding_new (G_OBJECT (window->menubar), "visible", G_OBJECT (window->spinner), "visible"); |