Theme: Scroller.edc-Improvement in left/right/top/bottom arrow behavior.
authorUmesh Tanwar <umesh.tanwar@samsung.com>
Fri, 7 Aug 2015 07:51:41 +0000 (16:51 +0900)
committerChunEon Park <hermet@hermet.pe.kr>
Fri, 7 Aug 2015 07:51:42 +0000 (16:51 +0900)
Summary:
When the scroller size changes by dragging the
corners, the calculations will miss the condition "x+w == x1 + w1".
This is because of format specific computer calculations. So,
improvisation is made in comparisons.

@ fix

Signed-off-by: Umesh Tanwar <umesh.tanwar@samsung.com>
Test Plan:
elementary_test -> scroller -> scroll to the extreme right (right arrow brightness changes).
Now, drag the lower right corner to increase the width of scroller. Drag the corner slowly to see the issue clearly.
The arrow brightness changes alternatively, instead the hbar is positioned to the extreme right.

Reviewers: Hermet, cedric, raster

Subscribers: singh.amitesh, eagleeye, SanghyeonLee, sachin.dev

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

data/themes/edc/elm/scroller.edc

index f1a57f6..cf1cb99 100644 (file)
@@ -44,7 +44,7 @@ group { name: "elm/scroller/base/default";
          get_geometry(PART:"y_vbar_up", x,y,w, h);
          get_geometry(PART:"y_vbar_up_mapper", x1,y1,w1, h1);
 
-         if(y == y1)
+         if((y1 <= y) && (y <= (y1 + h1)))
          {
             set_state(PART:"arrow1_vbar", "hidden", 0.0);
             set_state(PART:"sb_vbar_a1", "hidden", 0.0);
@@ -58,7 +58,7 @@ group { name: "elm/scroller/base/default";
          get_geometry(PART:"y_vbar_down", x,y,w, h);
          get_geometry(PART:"y_vbar_down_mapper", x1,y1,w1, h1);
 
-         if((y+h) == (y1+h1))
+         if((y1 <= (y + h)) && ((y+ h) <= (y1 + h1)))
          {
             set_state(PART:"arrow2_vbar", "hidden", 0.0);
             set_state(PART:"sb_vbar_a2", "hidden", 0.0);
@@ -79,7 +79,7 @@ group { name: "elm/scroller/base/default";
          get_geometry(PART:"x_hbar_left", x,y,w, h);
          get_geometry(PART:"x_hbar_left_mapper", x1,y1,w1, h1);
 
-         if(x == x1)
+         if((x1 <= x) && (x <= (x1 + w1)))
          {
             set_state(PART:"arrow1_hbar", "hidden", 0.0);
             set_state(PART:"sb_hbar_a1", "hidden", 0.0);
@@ -93,7 +93,7 @@ group { name: "elm/scroller/base/default";
          get_geometry(PART:"x_hbar_right", x,y,w, h);
          get_geometry(PART:"x_hbar_right_mapper", x1,y1,w1, h1);
 
-         if((x+w) == (x1+w1))
+         if((x1 <= (x + w)) && ((x + w) <= (x1 + w1)))
          {
             set_state(PART:"arrow2_hbar", "hidden", 0.0);
             set_state(PART:"sb_hbar_a2", "hidden", 0.0);