[libadwaita/wip/exalm/tabs2] tab-box: Fix pinned tab reorder range



commit 9f6302c599271b8fd594743aed74c7b25cb79def
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Tue Aug 2 12:04:44 2022 +0400

    tab-box: Fix pinned tab reorder range

 src/adw-tab-box.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/adw-tab-box.c b/src/adw-tab-box.c
index ae11239c..dfe58302 100644
--- a/src/adw-tab-box.c
+++ b/src/adw-tab-box.c
@@ -386,13 +386,6 @@ get_visible_range (AdwTabBox *self,
   int min = SPACING;
   int max = self->allocated_width - SPACING;
 
-  if (self->pinned) {
-    if (gtk_widget_get_direction (GTK_WIDGET (self)) == GTK_TEXT_DIR_RTL)
-      min -= SPACING;
-    else
-      max += SPACING;
-  }
-
   if (self->adjustment) {
     double value = gtk_adjustment_get_value (self->adjustment);
     double page_size = gtk_adjustment_get_page_size (self->adjustment);
@@ -401,6 +394,13 @@ get_visible_range (AdwTabBox *self,
     max = MIN (max, (int) ceil (value + page_size) - SPACING);
   }
 
+  if (self->pinned) {
+    if (gtk_widget_get_direction (GTK_WIDGET (self)) == GTK_TEXT_DIR_RTL)
+      min -= SPACING;
+    else
+      max += SPACING;
+  }
+
   if (lower)
     *lower = min;
 


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