[libadwaita/libadwaita-1-0] tab-box: Fix autoscroll for dragged tab
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/libadwaita-1-0] tab-box: Fix autoscroll for dragged tab
- Date: Mon, 11 Apr 2022 15:18:31 +0000 (UTC)
commit 34f1d75ecf70c8a938a271c56ebd3f633195a1ca
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Mon Apr 11 18:35:48 2022 +0400
tab-box: Fix autoscroll for dragged tab
We call adw_animation_pause() in that case and so that check was failing.
Regressed in cefc3ec8cf327c6a9959f1c3ca0929559398e348
(cherry picked from commit fe1445c716cb7a29928144218a9b98fbe0169b62)
(cherry picked from commit 4771b69aabb71fa88f1b64b469674b9b4bc4d08a)
src/adw-tab-box.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/adw-tab-box.c b/src/adw-tab-box.c
index c508bcbb..096962cf 100644
--- a/src/adw-tab-box.c
+++ b/src/adw-tab-box.c
@@ -2926,6 +2926,7 @@ adw_tab_box_size_allocate (GtkWidget *widget,
int baseline)
{
AdwTabBox *self = ADW_TAB_BOX (widget);
+ AdwAnimationState state;
gboolean is_rtl;
GList *l;
GtkAllocation child_allocation;
@@ -3035,7 +3036,8 @@ adw_tab_box_size_allocate (GtkWidget *widget,
self->scheduled_scroll.info = NULL;
}
- if (adw_animation_get_state (self->scroll_animation) != ADW_ANIMATION_IDLE) {
+ state = adw_animation_get_state (self->scroll_animation);
+ if (state == ADW_ANIMATION_PLAYING || state == ADW_ANIMATION_FINISHED) {
self->block_scrolling = TRUE;
gtk_adjustment_set_value (self->adjustment,
get_scroll_animation_value (self));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]