cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f50674db5884db0b89686d597970b6cf4eac6652

commit f50674db5884db0b89686d597970b6cf4eac6652
Author: Youngbok Shin <[email protected]>
Date:   Tue Sep 6 15:00:53 2016 -0700

    elementary label: use text width when label calculates duration for slide
    
    Summary:
    When developers customize theme for making different type of sliding label,
    it would be better to send a duration based on whole text.
    [The whole text width - label object's w] is only useful for short, bounce
    type sliding.
    
    Test Plan: N/A
    
    Reviewers: raster, tasn, herdsman, cedric
    
    Reviewed By: cedric
    
    Subscribers: minkyu, akanad, z-wony, Blackmole, jpeg
    
    Differential Revision: https://phab.enlightenment.org/D4255
    
    Signed-off-by: Cedric BAIL <[email protected]>
---
 src/lib/elementary/elm_label.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_label.c b/src/lib/elementary/elm_label.c
index a9acf51..7af1237 100644
--- a/src/lib/elementary/elm_label.c
+++ b/src/lib/elementary/elm_label.c
@@ -141,8 +141,12 @@ _label_slide_change(Evas_Object *obj)
         // calculate speed or duration
         if (!strcmp(elm_object_style_get(obj), "slide_long"))
           w = tb_w + w;
-        else // slide_short or slide_bounce
+        else if (!strcmp(elm_object_style_get(obj), "slide_short") ||
+                 !strcmp(elm_object_style_get(obj), "slide_bounce")) // 
slide_short or slide_bounce
           w = tb_w - w;
+        else
+          w = tb_w;
+
         if (sd->use_slide_speed)
           {
              if (sd->slide_speed <= 0) sd->slide_speed = 1;

-- 


Reply via email to