summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrii Kroitor <an.kroitor@samsung.com>2014-08-21 00:40:07 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-08-21 01:19:17 +0900
commit0ca13c33cd1e89c85793b1d3f5245d86459e051c (patch)
treebb4cab1370f694c62510807eecf4fee980b870eb
parentbc5450a95242682fb9b4e8a24c1bc98f1fef5239 (diff)
elm_notify: fixing style applying
Summary: added support of bottom_left, bottom_right, top_left, top_right styles of notify that are present in default theme @fix Reviewers: cedric, seoz, Hermet Subscribers: reutskiy.v.v Differential Revision: https://phab.enlightenment.org/D1329
-rw-r--r--src/lib/elm_notify.c35
1 files changed, 26 insertions, 9 deletions
diff --git a/src/lib/elm_notify.c b/src/lib/elm_notify.c
index 6f1ec92a3..62aa361ad 100644
--- a/src/lib/elm_notify.c
+++ b/src/lib/elm_notify.c
@@ -29,6 +29,7 @@ static void
29_notify_theme_apply(Evas_Object *obj) 29_notify_theme_apply(Evas_Object *obj)
30{ 30{
31 const char *style = elm_widget_style_get(obj); 31 const char *style = elm_widget_style_get(obj);
32 const char *position;
32 double ax, ay; 33 double ax, ay;
33 34
34 ELM_NOTIFY_DATA_GET(obj, sd); 35 ELM_NOTIFY_DATA_GET(obj, sd);
@@ -37,16 +38,32 @@ _notify_theme_apply(Evas_Object *obj)
37 ay = sd->vertical_align; 38 ay = sd->vertical_align;
38 if ((elm_widget_mirrored_get(obj)) && (ax != ELM_NOTIFY_ALIGN_FILL)) ax = 1.0 - ax; 39 if ((elm_widget_mirrored_get(obj)) && (ax != ELM_NOTIFY_ALIGN_FILL)) ax = 1.0 - ax;
39 40
40 if (ay == 0.0) 41 if (ay <= 0.3)
41 elm_widget_theme_object_set(obj, sd->notify, "notify", "top", style); 42 {
42 else if (ay == 1.0) 43 if (ax <= 0.3)
43 elm_widget_theme_object_set(obj, sd->notify, "notify", "bottom", style); 44 position = "top_left";
44 else if (ax == 0.0) 45 else if (ax >= 0.7)
45 elm_widget_theme_object_set(obj, sd->notify, "notify", "left", style); 46 position = "top_right";
46 else if (ax == 1.0) 47 else
47 elm_widget_theme_object_set(obj, sd->notify, "notify", "right", style); 48 position = "top";
49 }
50 else if (ay >= 0.7)
51 {
52 if (ax <= 0.3)
53 position = "bottom_left";
54 else if (ax >= 0.7)
55 position = "bottom_right";
56 else
57 position = "bottom";
58 }
59 else if (ax <= 0.3)
60 position = "left";
61 else if (ax >= 0.7)
62 position = "right";
48 else 63 else
49 elm_widget_theme_object_set(obj, sd->notify, "notify", "center", style); 64 position = "center";
65
66 elm_widget_theme_object_set(obj, sd->notify, "notify", position, style);
50} 67}
51 68
52/** 69/**