[libadwaita/libadwaita-1-1] tab-box: Fix resize deferring with non-expanded tabs
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/libadwaita-1-1] tab-box: Fix resize deferring with non-expanded tabs
- Date: Mon, 11 Apr 2022 12:53:06 +0000 (UTC)
commit e0a892501fb5fecf5a1a65e8f1e6383e350fc588
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Thu Apr 7 02:30:19 2022 +0400
tab-box: Fix resize deferring with non-expanded tabs
This bit was lost at some point.
(cherry picked from commit 87590711353c3b01361998752aebb3427386e7ca)
src/adw-tab-box.c | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/src/adw-tab-box.c b/src/adw-tab-box.c
index 1d25d23b..3b9e3c53 100644
--- a/src/adw-tab-box.c
+++ b/src/adw-tab-box.c
@@ -431,6 +431,13 @@ resize_animation_value_cb (double value,
gtk_widget_queue_resize (GTK_WIDGET (self));
}
+static void
+resize_animation_done_cb (AdwTabBox *self)
+{
+ self->end_padding = 0;
+ gtk_widget_queue_resize (GTK_WIDGET (self));
+}
+
static void
set_tab_resize_mode (AdwTabBox *self,
TabResizeMode mode)
@@ -3497,6 +3504,9 @@ adw_tab_box_init (AdwTabBox *self)
adw_timed_animation_new (GTK_WIDGET (self), 0, 1,
RESIZE_ANIMATION_DURATION, target);
+ g_signal_connect_swapped (self->resize_animation, "done",
+ G_CALLBACK (resize_animation_done_cb), self);
+
/* The actual update will be done in size_allocate(). After the animation
* finishes, don't remove it right away, it will be done in size-allocate as
* well after one last update, so that we don't miss the last frame.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]