[libhandy] stackable-box: Remove is_direction_dependent_child_transition()



commit 9ce7a09209332fd9c710f7ad23e31a489e933a79
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Thu Jun 18 16:29:03 2020 +0500

    stackable-box: Remove is_direction_dependent_child_transition()
    
    At this point all transitions are direction-dependent, so stop doing the
    check.
    
    Signed-off-by: Alexander Mikhaylenko <alexm gnome org>

 src/hdy-stackable-box.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)
---
diff --git a/src/hdy-stackable-box.c b/src/hdy-stackable-box.c
index 3b98d96e..05a4e21f 100644
--- a/src/hdy-stackable-box.c
+++ b/src/hdy-stackable-box.c
@@ -273,16 +273,6 @@ is_window_moving_child_transition (HdyStackableBox *self)
   }
 }
 
-/* Transitions that change direction depending on the relative order of the
-old and new child */
-static inline gboolean
-is_direction_dependent_child_transition (HdyStackableBoxTransitionType transition_type)
-{
-  return (transition_type == HDY_STACKABLE_BOX_TRANSITION_TYPE_OVER ||
-          transition_type == HDY_STACKABLE_BOX_TRANSITION_TYPE_UNDER ||
-          transition_type == HDY_STACKABLE_BOX_TRANSITION_TYPE_SLIDE);
-}
-
 static GtkPanDirection
 get_pan_direction (HdyStackableBox *self,
                    gboolean         new_child_first)
@@ -624,10 +614,9 @@ set_visible_child_info (HdyStackableBox               *self,
     /* } */
   }
 
-  if ((new_visible_child == NULL || self->last_visible_child == NULL) &&
-      is_direction_dependent_child_transition (transition_type))
+  if (new_visible_child == NULL || self->last_visible_child == NULL)
     transition_duration = 0;
-  else if (is_direction_dependent_child_transition (transition_type)) {
+  else {
     gboolean new_first = FALSE;
     for (children = self->children; children; children = children->next) {
       if (new_visible_child == children->data) {


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