From eadac79a1e18bdd51cbaccc30e6797b53b1c7614 Mon Sep 17 00:00:00 2001 From: Umesh Tanwar Date: Fri, 7 Aug 2015 16:51:41 +0900 Subject: [PATCH] Theme: Scroller.edc-Improvement in left/right/top/bottom arrow behavior. 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 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 --- legacy/elementary/data/themes/edc/elm/scroller.edc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/legacy/elementary/data/themes/edc/elm/scroller.edc b/legacy/elementary/data/themes/edc/elm/scroller.edc index f1a57f665e..cf1cb99c1f 100644 --- a/legacy/elementary/data/themes/edc/elm/scroller.edc +++ b/legacy/elementary/data/themes/edc/elm/scroller.edc @@ -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);