summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSungtaek Hong <sth253.hong@samsung.com>2017-11-29 21:54:24 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-06 17:35:21 +0900
commit5ad6b68b38be41b3823f8ea4e1d6df1651c1c1d0 (patch)
tree84989c6432980dbd8935ec4949d938b96024131b
parentb86d701aeee468a6d8f43b625cb0944dd50ffc05 (diff)
efl_ui_popup: apply new theme logic for alert_scroll, alert_text
-rw-r--r--data/elementary/themes/edc/efl/popup.edc37
-rw-r--r--src/lib/elementary/efl_ui_popup_alert.c2
-rw-r--r--src/lib/elementary/efl_ui_popup_alert_scroll.c6
-rw-r--r--src/lib/elementary/efl_ui_popup_alert_text.c9
-rw-r--r--src/lib/elementary/efl_ui_popup_anchor.c2
5 files changed, 46 insertions, 10 deletions
diff --git a/data/elementary/themes/edc/efl/popup.edc b/data/elementary/themes/edc/efl/popup.edc
index f617b30bfd..407a28b5dd 100644
--- a/data/elementary/themes/edc/efl/popup.edc
+++ b/data/elementary/themes/edc/efl/popup.edc
@@ -23,7 +23,9 @@ group { "efl/popup";
23 } 23 }
24} 24}
25 25
26group { "efl/popup.alert"; 26group { "efl/popup_alert";
27 alias: "efl/popup_alert_scroll";
28 alias: "efl/popup_alert_text";
27 images.image: "rounded_square.png" COMP; 29 images.image: "rounded_square.png" COMP;
28 parts { 30 parts {
29 image { "bg"; 31 image { "bg";
@@ -108,13 +110,15 @@ group { "efl/popup.alert";
108 } 110 }
109} 111}
110 112
111group { "efl/popup.anchor"; 113group { "efl/popup_anchor";
112 inherit: "efl/popup"; 114 inherit: "efl/popup";
113} 115}
114 116
115group { "efl/popup/backwall"; 117group { "efl/popup/backwall";
116 alias: "efl/popup.alert/backwall"; 118 alias: "efl/popup_alert/backwall";
117 alias: "efl/popup.anchor/backwall"; 119 alias: "efl/popup_alert_scroll/backwall";
120 alias: "efl/popup_alert_text/backwall";
121 alias: "efl/popup_anchor/backwall";
118 parts { 122 parts {
119 rect { "base"; 123 rect { "base";
120 desc { "default"; 124 desc { "default";
@@ -163,14 +167,18 @@ group { "efl/popup/backwall";
163 } 167 }
164} 168}
165 169
166group { "efl/popup.alert/button_layout1"; 170group { "efl/popup_alert/button_layout1";
171 alias: "efl/popup_alert_scroll/button_layout1";
172 alias: "efl/popup_alert_text/button_layout1";
167 parts { 173 parts {
168 swallow { "elm.swallow.button1"; 174 swallow { "elm.swallow.button1";
169 } 175 }
170 } 176 }
171} 177}
172 178
173group { "efl/popup.alert/button_layout2"; 179group { "efl/popup_alert/button_layout2";
180 alias: "efl/popup_alert_scroll/button_layout2";
181 alias: "efl/popup_alert_text/button_layout2";
174 parts { 182 parts {
175 spacer { "div1"; 183 spacer { "div1";
176 desc { "default"; 184 desc { "default";
@@ -194,7 +202,9 @@ group { "efl/popup.alert/button_layout2";
194 } 202 }
195} 203}
196 204
197group { "efl/popup.alert/button_layout3"; 205group { "efl/popup_alert/button_layout3";
206 alias: "efl/popup_alert_scroll/button_layout3";
207 alias: "efl/popup_alert_text/button_layout3";
198 parts { 208 parts {
199 spacer { "div1"; 209 spacer { "div1";
200 desc { "default"; 210 desc { "default";
@@ -233,6 +243,17 @@ group { "efl/popup.alert/button_layout3";
233 } 243 }
234} 244}
235 245
236group { "efl/popup.alert/button"; 246group { "efl/popup_alert/button";
237 inherit: "efl/button"; 247 inherit: "efl/button";
248 alias: "efl/popup_alert_scroll/button";
249 alias: "efl/popup_alert_text/button";
250}
251
252group { "efl/popup_alert_scroll/scroller";
253 inherit: "elm/scroller/base/popup/no_inset_shadow";
254 alias: "efl/popup_alert_text/scroller";
255}
256
257group { "efl/popup_alert_text/text";
258 inherit: "efl/text";
238} \ No newline at end of file 259} \ No newline at end of file
diff --git a/src/lib/elementary/efl_ui_popup_alert.c b/src/lib/elementary/efl_ui_popup_alert.c
index 39f7592f13..9a23d23f49 100644
--- a/src/lib/elementary/efl_ui_popup_alert.c
+++ b/src/lib/elementary/efl_ui_popup_alert.c
@@ -252,7 +252,7 @@ _efl_ui_popup_alert_efl_object_constructor(Eo *obj,
252 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); 252 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
253 253
254 if (!elm_widget_theme_klass_get(obj)) 254 if (!elm_widget_theme_klass_get(obj))
255 elm_widget_theme_klass_set(obj, "popup.alert"); 255 elm_widget_theme_klass_set(obj, "popup_alert");
256 obj = efl_constructor(efl_super(obj, MY_CLASS)); 256 obj = efl_constructor(efl_super(obj, MY_CLASS));
257 efl_canvas_object_type_set(obj, MY_CLASS_NAME); 257 efl_canvas_object_type_set(obj, MY_CLASS_NAME);
258 258
diff --git a/src/lib/elementary/efl_ui_popup_alert_scroll.c b/src/lib/elementary/efl_ui_popup_alert_scroll.c
index ed790db052..93b703a51a 100644
--- a/src/lib/elementary/efl_ui_popup_alert_scroll.c
+++ b/src/lib/elementary/efl_ui_popup_alert_scroll.c
@@ -12,6 +12,8 @@
12#define MY_CLASS EFL_UI_POPUP_ALERT_SCROLL_CLASS 12#define MY_CLASS EFL_UI_POPUP_ALERT_SCROLL_CLASS
13#define MY_CLASS_NAME "Efl.Ui.Popup.Alert.Scroll" 13#define MY_CLASS_NAME "Efl.Ui.Popup.Alert.Scroll"
14 14
15static const char PART_NAME_SCROLLER[] = "scroller";
16
15EOLIAN static void 17EOLIAN static void
16_efl_ui_popup_alert_scroll_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd EINA_UNUSED) 18_efl_ui_popup_alert_scroll_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd EINA_UNUSED)
17{ 19{
@@ -95,13 +97,17 @@ _efl_ui_popup_alert_scroll_efl_object_constructor(Eo *obj,
95{ 97{
96 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); 98 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
97 99
100 if (!elm_widget_theme_klass_get(obj))
101 elm_widget_theme_klass_set(obj, "popup_alert_scroll");
98 obj = efl_constructor(efl_super(obj, MY_CLASS)); 102 obj = efl_constructor(efl_super(obj, MY_CLASS));
99 efl_canvas_object_type_set(obj, MY_CLASS_NAME); 103 efl_canvas_object_type_set(obj, MY_CLASS_NAME);
100 104
101 elm_widget_sub_object_parent_add(obj); 105 elm_widget_sub_object_parent_add(obj);
102 106
107 // TODO: Change internal component to Efl.Ui.Widget
103 pd->scroller = elm_scroller_add(obj); 108 pd->scroller = elm_scroller_add(obj);
104 elm_object_style_set(pd->scroller, "popup/no_inset_shadow"); 109 elm_object_style_set(pd->scroller, "popup/no_inset_shadow");
110 //elm_widget_element_update(obj, pd->scroller, PART_NAME_SCROLLER);
105 elm_scroller_policy_set(pd->scroller, ELM_SCROLLER_POLICY_AUTO, 111 elm_scroller_policy_set(pd->scroller, ELM_SCROLLER_POLICY_AUTO,
106 ELM_SCROLLER_POLICY_AUTO); 112 ELM_SCROLLER_POLICY_AUTO);
107 113
diff --git a/src/lib/elementary/efl_ui_popup_alert_text.c b/src/lib/elementary/efl_ui_popup_alert_text.c
index 08793ac941..0b10350802 100644
--- a/src/lib/elementary/efl_ui_popup_alert_text.c
+++ b/src/lib/elementary/efl_ui_popup_alert_text.c
@@ -12,6 +12,9 @@
12#define MY_CLASS EFL_UI_POPUP_ALERT_TEXT_CLASS 12#define MY_CLASS EFL_UI_POPUP_ALERT_TEXT_CLASS
13#define MY_CLASS_NAME "Efl.Ui.Popup.Alert.Text" 13#define MY_CLASS_NAME "Efl.Ui.Popup.Alert.Text"
14 14
15static const char PART_NAME_SCROLLER[] = "scroller";
16static const char PART_NAME_TEXT[] = "text";
17
15EOLIAN static void 18EOLIAN static void
16_efl_ui_popup_alert_text_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Text_Data *pd EINA_UNUSED) 19_efl_ui_popup_alert_text_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Text_Data *pd EINA_UNUSED)
17{ 20{
@@ -50,7 +53,9 @@ _efl_ui_popup_alert_text_text_set(Eo *obj, Efl_Ui_Popup_Alert_Text_Data *pd, con
50 { 53 {
51 if (!pd->message) 54 if (!pd->message)
52 { 55 {
56 // TODO: Change internal component to Efl.Ui.Widget
53 pd->message = elm_label_add(obj); 57 pd->message = elm_label_add(obj);
58 //elm_widget_element_update(obj, pd->message, PART_NAME_TEXT);
54 elm_label_line_wrap_set(pd->message, ELM_WRAP_MIXED); 59 elm_label_line_wrap_set(pd->message, ELM_WRAP_MIXED);
55 efl_gfx_size_hint_weight_set(pd->message, EVAS_HINT_EXPAND, 60 efl_gfx_size_hint_weight_set(pd->message, EVAS_HINT_EXPAND,
56 EVAS_HINT_EXPAND); 61 EVAS_HINT_EXPAND);
@@ -97,13 +102,17 @@ _efl_ui_popup_alert_text_efl_object_constructor(Eo *obj,
97{ 102{
98 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); 103 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
99 104
105 if (!elm_widget_theme_klass_get(obj))
106 elm_widget_theme_klass_set(obj, "popup_alert_scroll");
100 obj = efl_constructor(efl_super(obj, MY_CLASS)); 107 obj = efl_constructor(efl_super(obj, MY_CLASS));
101 efl_canvas_object_type_set(obj, MY_CLASS_NAME); 108 efl_canvas_object_type_set(obj, MY_CLASS_NAME);
102 109
103 elm_widget_sub_object_parent_add(obj); 110 elm_widget_sub_object_parent_add(obj);
104 111
112 // TODO: Change internal component to Efl.Ui.Widget
105 pd->scroller = elm_scroller_add(obj); 113 pd->scroller = elm_scroller_add(obj);
106 elm_object_style_set(pd->scroller, "popup/no_inset_shadow"); 114 elm_object_style_set(pd->scroller, "popup/no_inset_shadow");
115 //elm_widget_element_update(obj, pd->scroller, PART_NAME_SCROLLER);
107 elm_scroller_policy_set(pd->scroller, ELM_SCROLLER_POLICY_OFF, 116 elm_scroller_policy_set(pd->scroller, ELM_SCROLLER_POLICY_OFF,
108 ELM_SCROLLER_POLICY_AUTO); 117 ELM_SCROLLER_POLICY_AUTO);
109 118
diff --git a/src/lib/elementary/efl_ui_popup_anchor.c b/src/lib/elementary/efl_ui_popup_anchor.c
index 2fb571a0b2..b1f278f6b2 100644
--- a/src/lib/elementary/efl_ui_popup_anchor.c
+++ b/src/lib/elementary/efl_ui_popup_anchor.c
@@ -353,7 +353,7 @@ _efl_ui_popup_anchor_efl_object_constructor(Eo *obj,
353 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); 353 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
354 354
355 if (!elm_widget_theme_klass_get(obj)) 355 if (!elm_widget_theme_klass_get(obj))
356 elm_widget_theme_klass_set(obj, "popup.anchor"); 356 elm_widget_theme_klass_set(obj, "popup_anchor");
357 obj = efl_constructor(efl_super(obj, MY_CLASS)); 357 obj = efl_constructor(efl_super(obj, MY_CLASS));
358 efl_canvas_object_type_set(obj, MY_CLASS_NAME); 358 efl_canvas_object_type_set(obj, MY_CLASS_NAME);
359 359