elm_interface_scrollable: correctly honor looping over
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Fri, 25 Oct 2019 18:05:00 +0000 (14:05 -0400)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 11 Nov 2019 02:20:39 +0000 (11:20 +0900)
Summary:
when looping is enabled, we need to ensure that the correct arrows are
enabled.

ref D9906

Depends on D9908

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9917

src/lib/elementary/elm_interface_scrollable.c

index 96059b6..be7e22d 100644 (file)
@@ -503,6 +503,18 @@ _elm_direction_arrows_eval(Elm_Scrollable_Smart_Interface_Data *sid, Eina_Bool r
    if (y <= miny) go_up = EINA_FALSE;
    if (y >= (my + miny)) go_down = EINA_FALSE;
 
+   if (sid->loop_v)
+     {
+        go_up = EINA_TRUE;
+        go_down = EINA_TRUE;
+     }
+
+   if (sid->loop_h)
+     {
+        go_right = EINA_TRUE;
+        go_left = EINA_TRUE;
+     }
+
    if (!rely_on_cache || go_left != sid->go_left)
      {
         if (go_left)