[libadwaita/wip/exalm/tab-style: 2/2] tab-box: Don't count spacing as part of the tab for autoscroll




commit c923fa4d794ad404c100e72f4f8fedfe6c647efe
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Apr 8 04:44:27 2022 +0400

    tab-box: Don't count spacing as part of the tab for autoscroll
    
    This made sense when it was overlap. Not so much now.
    
    Fixes https://gitlab.gnome.org/GNOME/libadwaita/-/issues/455

 src/adw-tab-box.c | 2 --
 1 file changed, 2 deletions(-)
---
diff --git a/src/adw-tab-box.c b/src/adw-tab-box.c
index a3ebcedb..cda21871 100644
--- a/src/adw-tab-box.c
+++ b/src/adw-tab-box.c
@@ -1338,13 +1338,11 @@ drag_autoscroll_cb (GtkWidget     *widget,
     gtk_widget_measure (self->reordered_tab->container,
                         GTK_ORIENTATION_HORIZONTAL, -1,
                         NULL, &tab_width, NULL, NULL);
-    tab_width += 2 * SPACING;
     x = (double) self->reorder_x - SPACING;
   } else if (self->drop_target_tab) {
     gtk_widget_measure (self->drop_target_tab->container,
                         GTK_ORIENTATION_HORIZONTAL, -1,
                         NULL, &tab_width, NULL, NULL);
-    tab_width += 2 * SPACING;
     x = (double) self->drop_target_x - SPACING - tab_width / 2;
   } else {
     return G_SOURCE_CONTINUE;


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