[gtk/wip/otte/listview: 6/23] listbase: Store the proper side
- From: Benjamin Otte <otte src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gtk/wip/otte/listview: 6/23] listbase: Store the proper side
 
- Date: Sat, 26 Feb 2022 03:03:22 +0000 (UTC)
 
commit 98da219c0b3f8753fc3c17eec5a07077fc1d70d3
Author: Benjamin Otte <otte redhat com>
Date:   Sun Feb 13 04:42:46 2022 +0100
    listbase: Store the proper side
    
    We want to store the side that is closer to the ideal position, not the
    one that is further away.
    
    Oops.
 gtk/gtklistbase.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtklistbase.c b/gtk/gtklistbase.c
index 1014de43c7..2548e61b31 100644
--- a/gtk/gtklistbase.c
+++ b/gtk/gtklistbase.c
@@ -219,18 +219,18 @@ gtk_list_base_adjustment_value_changed_cb (GtkAdjustment *adjustment,
   else if (cell_area.x >= area.x && cell_area.x + cell_area.width > area.x + area.width)
     side_across = GTK_PACK_START;
   else if (cell_area.x + cell_area.width / 2 > across)
-    side_across = GTK_PACK_END;
-  else
     side_across = GTK_PACK_START;
+  else
+    side_across = GTK_PACK_END;
 
   if (cell_area.y < area.y && cell_area.y + cell_area.height <= area.y + area.height)
     side_along = GTK_PACK_END;
   else if (cell_area.y >= area.y && cell_area.y + cell_area.height > area.y + area.height)
     side_along = GTK_PACK_START;
   else if (cell_area.y + cell_area.height / 2 > along)
-    side_along = GTK_PACK_END;
-  else
     side_along = GTK_PACK_START;
+  else
+    side_along = GTK_PACK_END;
 
   /* Compute the align based on side to keep the values identical */
   if (side_across == GTK_PACK_START)
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]