summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavemds <dave@gurumeditation.it>2014-02-10 22:53:26 +0100
committerdavemds <dave@gurumeditation.it>2014-02-10 22:53:26 +0100
commit471c7323fcd43479b1bf28bf3bc513f929590c41 (patch)
tree5d5388112196c3641700032f2e79695d618ca5a9
parent22eb42b3673db2b6e8af08f695e122ccd2a8687e (diff)
Label: better speed/duration calculation.
This fix the speed calculation with slide_short and slide_bounce animation. Previously the calc was right only for slide_long.
-rw-r--r--src/lib/elm_label.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/elm_label.c b/src/lib/elm_label.c
index 96591a4b8..5b46f3a14 100644
--- a/src/lib/elm_label.c
+++ b/src/lib/elm_label.c
@@ -130,15 +130,19 @@ _label_slide_change(Evas_Object *obj)
130 } 130 }
131 131
132 // calculate speed or duration 132 // calculate speed or duration
133 if (!strcmp(elm_object_style_get(obj), "slide_long"))
134 w = tb_w + w;
135 else // slide_short or slide_bounce
136 w = tb_w - w;
133 if (sd->use_slide_speed) 137 if (sd->use_slide_speed)
134 { 138 {
135 if (sd->slide_speed <= 0) sd->slide_speed = 1; 139 if (sd->slide_speed <= 0) sd->slide_speed = 1;
136 sd->slide_duration = (tb_w + w) / sd->slide_speed; 140 sd->slide_duration = w / sd->slide_speed;
137 } 141 }
138 else 142 else
139 { 143 {
140 if (sd->slide_duration <= 0) sd->slide_duration = 1; 144 if (sd->slide_duration <= 0) sd->slide_duration = 1;
141 sd->slide_speed = (tb_w + w) / sd->slide_duration; 145 sd->slide_speed = w / sd->slide_duration;
142 } 146 }
143 147
144 Edje_Message_Float_Set *msg = 148 Edje_Message_Float_Set *msg =