[libadwaita/wip/exalm/tab-fixes: 2/3] tab-box: Don't fade the currently reordered tab




commit f6b53e739d5b7163794853d8c1fdee41709d39fc
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Apr 11 17:00:23 2022 +0400

    tab-box: Don't fade the currently reordered tab

 src/adw-tab-box.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/adw-tab-box.c b/src/adw-tab-box.c
index 828a76bb..87cfffa0 100644
--- a/src/adw-tab-box.c
+++ b/src/adw-tab-box.c
@@ -3313,12 +3313,8 @@ snapshot_tabs (AdwTabBox   *self,
     gtk_widget_snapshot_child (GTK_WIDGET (self), info->separator, snapshot);
   }
 
-  if (is_clipping) {
+  if (is_clipping)
     gtk_snapshot_pop (snapshot);
-
-    gtk_widget_snapshot_child (GTK_WIDGET (self), self->reordered_tab->container, snapshot);
-    gtk_widget_snapshot_child (GTK_WIDGET (self), self->reordered_tab->separator, snapshot);
-  }
 }
 
 static void
@@ -3372,6 +3368,11 @@ adw_tab_box_snapshot (GtkWidget   *widget,
     gtk_snapshot_pop (snapshot);
   }
 
+  if (self->reordered_tab && gtk_widget_get_opacity (self->reordered_tab->container) > 0) {
+    gtk_widget_snapshot_child (GTK_WIDGET (self), self->reordered_tab->container, snapshot);
+    gtk_widget_snapshot_child (GTK_WIDGET (self), self->reordered_tab->separator, snapshot);
+  }
+
   gtk_widget_snapshot_child (GTK_WIDGET (self), self->needs_attention_left, snapshot);
   gtk_widget_snapshot_child (GTK_WIDGET (self), self->needs_attention_right, snapshot);
 }


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