[gtk/wip/otte/listview: 6/15] listbase: Store the proper side




commit c6956b69595b15789928ea7575dbbb30ac82301b
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]