[libadwaita/wip/exalm/tab-style: 5/5] tab-box: Fix resize deferring with non-expanded tabs
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/tab-style: 5/5] tab-box: Fix resize deferring with non-expanded tabs
- Date: Wed, 6 Apr 2022 22:30:54 +0000 (UTC)
commit 71795e3ad681ff39f8e909b4e14f39ea4f01a529
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.
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 fc395048..5dfd3e28 100644
--- a/src/adw-tab-box.c
+++ b/src/adw-tab-box.c
@@ -523,6 +523,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)
@@ -3700,6 +3707,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]