[libadwaita/wip/exalm/tabs2: 2/4] tab-box: Remove scheduled scrolling




commit f46babb9b81a9b1abb7ef89ca1f33bc71261dd94
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Tue Aug 2 11:09:00 2022 +0400

    tab-box: Remove scheduled scrolling
    
    Since we use final positions there, it doesn't matter anymore.

 src/adw-tab-box.c | 27 ---------------------------
 1 file changed, 27 deletions(-)
---
diff --git a/src/adw-tab-box.c b/src/adw-tab-box.c
index c74da3a7..6e710b1d 100644
--- a/src/adw-tab-box.c
+++ b/src/adw-tab-box.c
@@ -149,13 +149,6 @@ struct _AdwTabBox
   guint reset_drop_target_tab_id;
   double drop_target_x;
 
-  struct {
-    TabInfo *info;
-    int pos;
-    guint duration;
-    gboolean keep_selected_visible;
-  } scheduled_scroll;
-
   AdwAnimation *scroll_animation;
   gboolean scroll_animation_done;
   double scroll_animation_from;
@@ -939,17 +932,6 @@ scroll_to_tab_full (AdwTabBox *self,
 
   tab_width = info->width;
 
-  if (tab_width < 0) {
-    self->scheduled_scroll.info = info;
-    self->scheduled_scroll.pos = pos;
-    self->scheduled_scroll.duration = duration;
-    self->scheduled_scroll.keep_selected_visible = keep_selected_visible;
-
-    gtk_widget_queue_allocate (GTK_WIDGET (self));
-
-    return FALSE;
-  }
-
   if (info->appear_animation)
     tab_width = info->final_width;
 
@@ -3253,15 +3235,6 @@ adw_tab_box_size_allocate (GtkWidget *widget,
     final_pos += (is_rtl ? -1 : 1) * (info->final_width + SPACING);
   }
 
-  if (self->scheduled_scroll.info &&
-      scroll_to_tab_full (self,
-                          self->scheduled_scroll.info,
-                          self->scheduled_scroll.pos,
-                          self->scheduled_scroll.duration,
-                          self->scheduled_scroll.keep_selected_visible)) {
-    self->scheduled_scroll.info = NULL;
-  }
-
   state = adw_animation_get_state (self->scroll_animation);
   if (state == ADW_ANIMATION_PLAYING || state == ADW_ANIMATION_FINISHED) {
     self->block_scrolling = TRUE;


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