summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSungtaek Hong <sth253.hong@samsung.com>2017-11-29 20:21:14 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-06 17:35:21 +0900
commitb86d701aeee468a6d8f43b625cb0944dd50ffc05 (patch)
tree44e864761eca9a7801a148f439eee6b7dac8a17d
parent7e58dd5580e0ec917453f943a5730c928921b574 (diff)
efl_ui_popup: apply new theme logic for efl_ui_popup
-rw-r--r--data/elementary/themes/Makefile.am1
-rw-r--r--data/elementary/themes/default.edc1
-rw-r--r--data/elementary/themes/edc/efl/popup.edc238
-rw-r--r--data/elementary/themes/edc/elm/popup.edc229
-rw-r--r--src/lib/elementary/efl_ui_popup.c12
-rw-r--r--src/lib/elementary/efl_ui_popup_alert.c57
-rw-r--r--src/lib/elementary/efl_ui_popup_anchor.c2
7 files changed, 291 insertions, 249 deletions
diff --git a/data/elementary/themes/Makefile.am b/data/elementary/themes/Makefile.am
index 758f7781c2..4bc6ec9987 100644
--- a/data/elementary/themes/Makefile.am
+++ b/data/elementary/themes/Makefile.am
@@ -1028,6 +1028,7 @@ elementary/themes/edc/efl/multibuttonentry.edc \
1028elementary/themes/edc/efl/nstate.edc \ 1028elementary/themes/edc/efl/nstate.edc \
1029elementary/themes/edc/efl/panes.edc \ 1029elementary/themes/edc/efl/panes.edc \
1030elementary/themes/edc/efl/photocam.edc \ 1030elementary/themes/edc/efl/photocam.edc \
1031elementary/themes/edc/efl/popup.edc \
1031elementary/themes/edc/efl/progress.edc \ 1032elementary/themes/edc/efl/progress.edc \
1032elementary/themes/edc/efl/radio.edc \ 1033elementary/themes/edc/efl/radio.edc \
1033elementary/themes/edc/efl/scroller.edc \ 1034elementary/themes/edc/efl/scroller.edc \
diff --git a/data/elementary/themes/default.edc b/data/elementary/themes/default.edc
index d3254be0e2..1bbd492217 100644
--- a/data/elementary/themes/default.edc
+++ b/data/elementary/themes/default.edc
@@ -179,6 +179,7 @@ collections {
179#include "edc/efl/slider.edc" 179#include "edc/efl/slider.edc"
180#include "edc/efl/radio.edc" 180#include "edc/efl/radio.edc"
181#include "edc/efl/panes.edc" 181#include "edc/efl/panes.edc"
182#include "edc/efl/popup.edc"
182#include "edc/efl/video.edc" 183#include "edc/efl/video.edc"
183#include "edc/efl/focus.edc" 184#include "edc/efl/focus.edc"
184#include "edc/efl/multibuttonentry.edc" 185#include "edc/efl/multibuttonentry.edc"
diff --git a/data/elementary/themes/edc/efl/popup.edc b/data/elementary/themes/edc/efl/popup.edc
new file mode 100644
index 0000000000..f617b30bfd
--- /dev/null
+++ b/data/elementary/themes/edc/efl/popup.edc
@@ -0,0 +1,238 @@
1//Efl.Ui.Popup Themes
2group { "efl/popup";
3 images.image: "rounded_square.png" COMP;
4 parts {
5 spacer { "base";
6 desc { "default";
7 rel1.offset: 10 10;
8 rel2.offset: -11 -11;
9 }
10 }
11 image { "bg";
12 desc { "default";
13 min: 100 100;
14 image.border: 15 15 15 15;
15 image.normal: "rounded_square.png";
16 }
17 }
18 swallow { "elm.swallow.content";
19 desc { "default";
20 rel.to: "base";
21 }
22 }
23 }
24}
25
26group { "efl/popup.alert";
27 images.image: "rounded_square.png" COMP;
28 parts {
29 image { "bg";
30 desc { "default";
31 min: 100 100;
32 image.border: 15 15 15 15;
33 image.normal: "rounded_square.png";
34 }
35 }
36 spacer { "base";
37 desc { "default";
38 rel.to: "bg";
39 rel1.offset: 10 10;
40 rel2.offset: -11 -11;
41 }
42 }
43 rect { "title_bg";
44 desc { "default";
45 fixed: 0 1;
46 min: 0 0;
47 rel.to: "base";
48 rel2.relative: 1.0 0.0;
49 align: 0.5 0.0;
50 color: 0 0 0 0;
51 }
52 desc { "title_visible";
53 inherit: "default";
54 min: 0 20;
55 }
56 }
57 textblock { "elm.text.title";
58 scale;
59 desc { "default";
60 fixed: 1 1;
61 text {
62 style: "popup_title_style_ellipsis";
63 }
64 rel.to: "title_bg";
65 hid;
66 }
67 desc { "title_visible";
68 inherit: "default";
69 vis;
70 }
71 }
72 swallow { "buttons";
73 desc { "default";
74 fixed: 0 1;
75 rel.to: "base";
76 rel1.relative: 0.0 1.0;
77 align: 0.5 1.0;
78 min: 0 0;
79 }
80 desc { "button_visible";
81 inherit: "default";
82 min: 0 30;
83 }
84 }
85 swallow { "elm.swallow.content";
86 desc { "default";
87 rel1.to_x: "base";
88 rel1.to_y: "title_bg";
89 rel2.to_x: "base";
90 rel2.to_y: "buttons";
91 rel1.relative: 0.0 1.0;
92 rel2.relative: 1.0 0.0;
93 }
94 }
95 }
96 programs {
97 program {
98 signal: "elm,title,show"; source: "elm";
99 action: STATE_SET "title_visible" 0.0;
100 target: "title_bg";
101 target: "elm.text.title";
102 }
103 program {
104 signal: "elm,buttons,show"; source: "elm";
105 action: STATE_SET "button_visible" 0.0;
106 target: "buttons";
107 }
108 }
109}
110
111group { "efl/popup.anchor";
112 inherit: "efl/popup";
113}
114
115group { "efl/popup/backwall";
116 alias: "efl/popup.alert/backwall";
117 alias: "efl/popup.anchor/backwall";
118 parts {
119 rect { "base";
120 desc { "default";
121 color: 0 0 0 64;
122 }
123 desc { "show_image";
124 inherit: "default";
125 hid;
126 }
127 }
128 swallow { "elm.swallow.image";
129 desc { "default";
130 rel.to: "base";
131 hid;
132 }
133 desc { "show_image";
134 inherit: "default";
135 vis;
136 }
137 }
138 rect { "block";
139 desc { "default";
140 rel.to: "base";
141 color: 0 0 0 0;
142 }
143 }
144 }
145
146 programs {
147 program {
148 signal: "elm,state,image,visible"; source: "elm";
149 action: STATE_SET "show_image" 0.0;
150 target: "base";
151 target: "elm.swallow.image";
152 }
153 program {
154 signal: "elm,state,image,hidden"; source: "elm";
155 action: STATE_SET "default" 0.0;
156 target: "base";
157 target: "elm.swallow.image";
158 }
159 program {
160 signal: "mouse,clicked,1"; source: "block";
161 action: SIGNAL_EMIT "elm,action,clicked" "elm";
162 }
163 }
164}
165
166group { "efl/popup.alert/button_layout1";
167 parts {
168 swallow { "elm.swallow.button1";
169 }
170 }
171}
172
173group { "efl/popup.alert/button_layout2";
174 parts {
175 spacer { "div1";
176 desc { "default";
177 rel1.relative: 0.5 0.5;
178 rel2.relative: 0.5 0.5;
179 min: 5 5;
180 }
181 }
182 swallow { "elm.swallow.button1";
183 desc { "default";
184 rel2.to_x: "div1";
185 rel2.relative: 0.0 1.0;
186 }
187 }
188 swallow { "elm.swallow.button2";
189 desc { "default";
190 rel1.to_x: "div1";
191 rel1.relative: 1.0 0.0;
192 }
193 }
194 }
195}
196
197group { "efl/popup.alert/button_layout3";
198 parts {
199 spacer { "div1";
200 desc { "default";
201 rel1.relative: 0.333 0.5;
202 rel2.relative: 0.333 0.5;
203 min: 5 5;
204 }
205 }
206 spacer { "div2";
207 desc { "default";
208 rel1.relative: 0.666 0.5;
209 rel2.relative: 0.666 0.5;
210 min: 5 5;
211 }
212 }
213 swallow { "elm.swallow.button1";
214 desc { "default";
215 rel2.to_x: "div1";
216 rel2.relative: 0.0 1.0;
217 }
218 }
219 swallow { "elm.swallow.button2";
220 desc { "default";
221 rel1.to_x: "div1";
222 rel2.to_x: "div2";
223 rel1.relative: 1.0 0.0;
224 rel2.relative: 0.0 1.0;
225 }
226 }
227 swallow { "elm.swallow.button3";
228 desc { "default";
229 rel1.to_x: "div2";
230 rel1.relative: 1.0 0.0;
231 }
232 }
233 }
234}
235
236group { "efl/popup.alert/button";
237 inherit: "efl/button";
238} \ No newline at end of file
diff --git a/data/elementary/themes/edc/elm/popup.edc b/data/elementary/themes/edc/elm/popup.edc
index e39b5cd5c3..a4c5f07d7e 100644
--- a/data/elementary/themes/edc/elm/popup.edc
+++ b/data/elementary/themes/edc/elm/popup.edc
@@ -515,232 +515,3 @@ group { name: "elm/popup/base/subpopup";
515 } 515 }
516 } 516 }
517} 517}
518
519//Efl.Ui.Popup Themes
520group { "elm/popup/base/view";
521 images.image: "rounded_square.png" COMP;
522 parts {
523 spacer { "base";
524 desc { "default";
525 rel1.offset: 10 10;
526 rel2.offset: -11 -11;
527 }
528 }
529 image { "bg";
530 desc { "default";
531 min: 100 100;
532 image.border: 15 15 15 15;
533 image.normal: "rounded_square.png";
534 }
535 }
536 swallow { "elm.swallow.content";
537 desc { "default";
538 rel.to: "base";
539 }
540 }
541 }
542}
543
544group { "elm/popup/base/alert";
545 images.image: "rounded_square.png" COMP;
546 parts {
547 image { "bg";
548 desc { "default";
549 min: 100 100;
550 image.border: 15 15 15 15;
551 image.normal: "rounded_square.png";
552 }
553 }
554 spacer { "base";
555 desc { "default";
556 rel.to: "bg";
557 rel1.offset: 10 10;
558 rel2.offset: -11 -11;
559 }
560 }
561 rect { "title_bg";
562 desc { "default";
563 fixed: 0 1;
564 min: 0 0;
565 rel.to: "base";
566 rel2.relative: 1.0 0.0;
567 align: 0.5 0.0;
568 color: 0 0 0 0;
569 }
570 desc { "title_visible";
571 inherit: "default";
572 min: 0 20;
573 }
574 }
575 textblock { "elm.text.title";
576 scale;
577 desc { "default";
578 fixed: 1 1;
579 text {
580 style: "popup_title_style_ellipsis";
581 }
582 rel.to: "title_bg";
583 hid;
584 }
585 desc { "title_visible";
586 inherit: "default";
587 vis;
588 }
589 }
590 swallow { "buttons";
591 desc { "default";
592 fixed: 0 1;
593 rel.to: "base";
594 rel1.relative: 0.0 1.0;
595 align: 0.5 1.0;
596 min: 0 0;
597 }
598 desc { "button_visible";
599 inherit: "default";
600 min: 0 30;
601 }
602 }
603 swallow { "elm.swallow.content";
604 desc { "default";
605 rel1.to_x: "base";
606 rel1.to_y: "title_bg";
607 rel2.to_x: "base";
608 rel2.to_y: "buttons";
609 rel1.relative: 0.0 1.0;
610 rel2.relative: 1.0 0.0;
611 }
612 }
613 }
614 programs {
615 program {
616 signal: "elm,title,show"; source: "elm";
617 action: STATE_SET "title_visible" 0.0;
618 target: "title_bg";
619 target: "elm.text.title";
620 }
621 program {
622 signal: "elm,buttons,show"; source: "elm";
623 action: STATE_SET "button_visible" 0.0;
624 target: "buttons";
625 }
626 }
627}
628
629group { "elm/popup/base/backwall";
630 parts {
631 rect { "base";
632 desc { "default";
633 color: 0 0 0 64;
634 }
635 desc { "show_image";
636 inherit: "default";
637 hid;
638 }
639 }
640 swallow { "elm.swallow.image";
641 desc { "default";
642 rel.to: "base";
643 hid;
644 }
645 desc { "show_image";
646 inherit: "default";
647 vis;
648 }
649 }
650 rect { "block";
651 desc { "default";
652 rel.to: "base";
653 color: 0 0 0 0;
654 }
655 }
656 }
657
658 programs {
659 program {
660 signal: "elm,state,image,visible"; source: "elm";
661 action: STATE_SET "show_image" 0.0;
662 target: "base";
663 target: "elm.swallow.image";
664 }
665 program {
666 signal: "elm,state,image,hidden"; source: "elm";
667 action: STATE_SET "default" 0.0;
668 target: "base";
669 target: "elm.swallow.image";
670 }
671 program {
672 signal: "mouse,clicked,1"; source: "block";
673 action: SIGNAL_EMIT "elm,action,clicked" "elm";
674 }
675 }
676}
677
678group { "elm/popup/base/button1";
679 parts {
680 swallow { "elm.swallow.button1";
681 }
682 }
683}
684
685group { "elm/popup/base/button2";
686 parts {
687 spacer { "div1";
688 desc { "default";
689 rel1.relative: 0.5 0.5;
690 rel2.relative: 0.5 0.5;
691 min: 5 5;
692 }
693 }
694 swallow { "elm.swallow.button1";
695 desc { "default";
696 rel2.to_x: "div1";
697 rel2.relative: 0.0 1.0;
698 }
699 }
700 swallow { "elm.swallow.button2";
701 desc { "default";
702 rel1.to_x: "div1";
703 rel1.relative: 1.0 0.0;
704 }
705 }
706 }
707}
708
709group { "elm/popup/base/button3";
710 parts {
711 spacer { "div1";
712 desc { "default";
713 rel1.relative: 0.333 0.5;
714 rel2.relative: 0.333 0.5;
715 min: 5 5;
716 }
717 }
718 spacer { "div2";
719 desc { "default";
720 rel1.relative: 0.666 0.5;
721 rel2.relative: 0.666 0.5;
722 min: 5 5;
723 }
724 }
725 swallow { "elm.swallow.button1";
726 desc { "default";
727 rel2.to_x: "div1";
728 rel2.relative: 0.0 1.0;
729 }
730 }
731 swallow { "elm.swallow.button2";
732 desc { "default";
733 rel1.to_x: "div1";
734 rel2.to_x: "div2";
735 rel1.relative: 1.0 0.0;
736 rel2.relative: 0.0 1.0;
737 }
738 }
739 swallow { "elm.swallow.button3";
740 desc { "default";
741 rel1.to_x: "div2";
742 rel1.relative: 1.0 0.0;
743 }
744 }
745 }
746}
diff --git a/src/lib/elementary/efl_ui_popup.c b/src/lib/elementary/efl_ui_popup.c
index 7f8fbe133b..34d6732595 100644
--- a/src/lib/elementary/efl_ui_popup.c
+++ b/src/lib/elementary/efl_ui_popup.c
@@ -14,6 +14,8 @@
14#define MY_CLASS EFL_UI_POPUP_CLASS 14#define MY_CLASS EFL_UI_POPUP_CLASS
15#define MY_CLASS_NAME "Efl.Ui.Popup" 15#define MY_CLASS_NAME "Efl.Ui.Popup"
16 16
17static const char PART_NAME_BACKWALL[] = "backwall";
18
17static void 19static void
18_backwall_clicked_cb(void *data, 20_backwall_clicked_cb(void *data,
19 Eo *o EINA_UNUSED, 21 Eo *o EINA_UNUSED,
@@ -178,16 +180,22 @@ _efl_ui_popup_efl_object_constructor(Eo *obj, Efl_Ui_Popup_Data *pd)
178{ 180{
179 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); 181 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
180 182
183 if (!elm_widget_theme_klass_get(obj))
184 elm_widget_theme_klass_set(obj, "popup");
181 obj = efl_constructor(efl_super(obj, MY_CLASS)); 185 obj = efl_constructor(efl_super(obj, MY_CLASS));
182 efl_canvas_object_type_set(obj, MY_CLASS_NAME); 186 efl_canvas_object_type_set(obj, MY_CLASS_NAME);
183 187
184 elm_widget_sub_object_parent_add(obj); 188 elm_widget_sub_object_parent_add(obj);
185 189
186 elm_widget_can_focus_set(obj, EINA_TRUE); 190 elm_widget_can_focus_set(obj, EINA_TRUE);
187 elm_layout_theme_set(obj, "popup", "base", "view"); 191 if (!elm_widget_theme_object_set(obj, wd->resize_obj,
192 elm_widget_theme_klass_get(obj),
193 elm_widget_theme_element_get(obj),
194 elm_widget_theme_style_get(obj)))
195 CRI("Failed to set layout!");
188 196
189 pd->backwall = edje_object_add(evas_object_evas_get(obj)); 197 pd->backwall = edje_object_add(evas_object_evas_get(obj));
190 elm_widget_theme_object_set(obj, pd->backwall, "popup", "base", "backwall"); 198 elm_widget_element_update(obj, pd->backwall, PART_NAME_BACKWALL);
191 evas_object_smart_member_add(pd->backwall, obj); 199 evas_object_smart_member_add(pd->backwall, obj);
192 evas_object_stack_below(pd->backwall, wd->resize_obj); 200 evas_object_stack_below(pd->backwall, wd->resize_obj);
193 201
diff --git a/src/lib/elementary/efl_ui_popup_alert.c b/src/lib/elementary/efl_ui_popup_alert.c
index 13e708f50b..39f7592f13 100644
--- a/src/lib/elementary/efl_ui_popup_alert.c
+++ b/src/lib/elementary/efl_ui_popup_alert.c
@@ -12,6 +12,12 @@
12#define MY_CLASS EFL_UI_POPUP_ALERT_CLASS 12#define MY_CLASS EFL_UI_POPUP_ALERT_CLASS
13#define MY_CLASS_NAME "Efl.Ui.Popup.Alert" 13#define MY_CLASS_NAME "Efl.Ui.Popup.Alert"
14 14
15static const char PART_NAME_BUTTON[] = "button";
16static const char PART_NAME_BUTTON_LAYOUT[EFL_UI_POPUP_ALERT_BUTTON_COUNT][15] =
17 {"button_layout1",
18 "button_layout2",
19 "button_layout3"};
20
15EOLIAN static void 21EOLIAN static void
16_efl_ui_popup_alert_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Data *pd EINA_UNUSED) 22_efl_ui_popup_alert_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Data *pd EINA_UNUSED)
17{ 23{
@@ -127,8 +133,9 @@ _efl_ui_popup_alert_button_set(Eo *obj, Efl_Ui_Popup_Alert_Data *pd, Efl_Ui_Popu
127 efl_del(pd->button[type]); 133 efl_del(pd->button[type]);
128 pd->button[type] = NULL; 134 pd->button[type] = NULL;
129 } 135 }
130 pd->button[type] = elm_button_add(obj); 136 pd->button[type] = efl_add(EFL_UI_BUTTON_CLASS, obj,
131 elm_object_text_set(pd->button[type], text); 137 elm_widget_element_update(obj, efl_added, PART_NAME_BUTTON),
138 efl_text_set(efl_added, text));
132 139
133 switch (type) 140 switch (type)
134 { 141 {
@@ -164,8 +171,10 @@ _efl_ui_popup_alert_button_set(Eo *obj, Efl_Ui_Popup_Alert_Data *pd, Efl_Ui_Popu
164 && pd->button[EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE] 171 && pd->button[EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE]
165 && pd->button[EFL_UI_POPUP_ALERT_BUTTON_USER]) 172 && pd->button[EFL_UI_POPUP_ALERT_BUTTON_USER])
166 { 173 {
167 pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_3] = elm_layout_add(obj); 174 pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_3]
168 elm_layout_theme_set(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_3], "popup", "base", "button3"); 175 = efl_add(EFL_UI_LAYOUT_CLASS, obj,
176 elm_widget_element_update(obj, efl_added,
177 PART_NAME_BUTTON_LAYOUT[EFL_UI_POPUP_ALERT_BUTTON_3]));
169 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_3], "elm.swallow.button1"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_USER]); 178 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_3], "elm.swallow.button1"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_USER]);
170 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_3], "elm.swallow.button2"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_POSITIVE]); 179 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_3], "elm.swallow.button2"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_POSITIVE]);
171 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_3], "elm.swallow.button3"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE]); 180 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_3], "elm.swallow.button3"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE]);
@@ -174,8 +183,10 @@ _efl_ui_popup_alert_button_set(Eo *obj, Efl_Ui_Popup_Alert_Data *pd, Efl_Ui_Popu
174 else if (pd->button[EFL_UI_POPUP_ALERT_BUTTON_POSITIVE] 183 else if (pd->button[EFL_UI_POPUP_ALERT_BUTTON_POSITIVE]
175 && pd->button[EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE]) 184 && pd->button[EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE])
176 { 185 {
177 pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2] = elm_layout_add(obj); 186 pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2]
178 elm_layout_theme_set(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2], "popup", "base", "button2"); 187 = efl_add(EFL_UI_LAYOUT_CLASS, obj,
188 elm_widget_element_update(obj, efl_added,
189 PART_NAME_BUTTON_LAYOUT[EFL_UI_POPUP_ALERT_BUTTON_2]));
179 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2], "elm.swallow.button1"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_POSITIVE]); 190 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2], "elm.swallow.button1"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_POSITIVE]);
180 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2], "elm.swallow.button2"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE]); 191 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2], "elm.swallow.button2"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE]);
181 efl_content_set(efl_part(obj, "buttons"), pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2]); 192 efl_content_set(efl_part(obj, "buttons"), pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2]);
@@ -183,8 +194,10 @@ _efl_ui_popup_alert_button_set(Eo *obj, Efl_Ui_Popup_Alert_Data *pd, Efl_Ui_Popu
183 else if (pd->button[EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE] 194 else if (pd->button[EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE]
184 && pd->button[EFL_UI_POPUP_ALERT_BUTTON_USER]) 195 && pd->button[EFL_UI_POPUP_ALERT_BUTTON_USER])
185 { 196 {
186 pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2] = elm_layout_add(obj); 197 pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2]
187 elm_layout_theme_set(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2], "popup", "base", "button2"); 198 = efl_add(EFL_UI_LAYOUT_CLASS, obj,
199 elm_widget_element_update(obj, efl_added,
200 PART_NAME_BUTTON_LAYOUT[EFL_UI_POPUP_ALERT_BUTTON_2]));
188 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2], "elm.swallow.button1"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_USER]); 201 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2], "elm.swallow.button1"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_USER]);
189 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2], "elm.swallow.button2"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE]); 202 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2], "elm.swallow.button2"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE]);
190 efl_content_set(efl_part(obj, "buttons"), pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2]); 203 efl_content_set(efl_part(obj, "buttons"), pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2]);
@@ -192,30 +205,38 @@ _efl_ui_popup_alert_button_set(Eo *obj, Efl_Ui_Popup_Alert_Data *pd, Efl_Ui_Popu
192 else if (pd->button[EFL_UI_POPUP_ALERT_BUTTON_POSITIVE] 205 else if (pd->button[EFL_UI_POPUP_ALERT_BUTTON_POSITIVE]
193 && pd->button[EFL_UI_POPUP_ALERT_BUTTON_USER]) 206 && pd->button[EFL_UI_POPUP_ALERT_BUTTON_USER])
194 { 207 {
195 pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2] = elm_layout_add(obj); 208 pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2]
196 elm_layout_theme_set(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2], "popup", "base", "button2"); 209 = efl_add(EFL_UI_LAYOUT_CLASS, obj,
210 elm_widget_element_update(obj, efl_added,
211 PART_NAME_BUTTON_LAYOUT[EFL_UI_POPUP_ALERT_BUTTON_2]));
197 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2], "elm.swallow.button1"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_USER]); 212 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2], "elm.swallow.button1"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_USER]);
198 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2], "elm.swallow.button2"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_POSITIVE]); 213 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2], "elm.swallow.button2"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_POSITIVE]);
199 efl_content_set(efl_part(obj, "buttons"), pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2]); 214 efl_content_set(efl_part(obj, "buttons"), pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_2]);
200 } 215 }
201 else if (pd->button[EFL_UI_POPUP_ALERT_BUTTON_POSITIVE]) 216 else if (pd->button[EFL_UI_POPUP_ALERT_BUTTON_POSITIVE])
202 { 217 {
203 pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1] = elm_layout_add(obj); 218 pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1]
204 elm_layout_theme_set(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1], "popup", "base", "button1"); 219 = efl_add(EFL_UI_LAYOUT_CLASS, obj,
220 elm_widget_element_update(obj, efl_added,
221 PART_NAME_BUTTON_LAYOUT[EFL_UI_POPUP_ALERT_BUTTON_1]));
205 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1], "elm.swallow.button1"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_POSITIVE]); 222 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1], "elm.swallow.button1"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_POSITIVE]);
206 efl_content_set(efl_part(obj, "buttons"), pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1]); 223 efl_content_set(efl_part(obj, "buttons"), pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1]);
207 } 224 }
208 else if (pd->button[EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE]) 225 else if (pd->button[EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE])
209 { 226 {
210 pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1] = elm_layout_add(obj); 227 pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1]
211 elm_layout_theme_set(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1], "popup", "base", "button1"); 228 = efl_add(EFL_UI_LAYOUT_CLASS, obj,
229 elm_widget_element_update(obj, efl_added,
230 PART_NAME_BUTTON_LAYOUT[EFL_UI_POPUP_ALERT_BUTTON_1]));
212 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1], "elm.swallow.button1"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE]); 231 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1], "elm.swallow.button1"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE]);
213 efl_content_set(efl_part(obj, "buttons"), pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1]); 232 efl_content_set(efl_part(obj, "buttons"), pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1]);
214 } 233 }
215 else if (pd->button[EFL_UI_POPUP_ALERT_BUTTON_USER]) 234 else if (pd->button[EFL_UI_POPUP_ALERT_BUTTON_USER])
216 { 235 {
217 pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1] = elm_layout_add(obj); 236 pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1]
218 elm_layout_theme_set(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1], "popup", "base", "button1"); 237 = efl_add(EFL_UI_LAYOUT_CLASS, obj,
238 elm_widget_element_update(obj, efl_added,
239 PART_NAME_BUTTON_LAYOUT[EFL_UI_POPUP_ALERT_BUTTON_1]));
219 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1], "elm.swallow.button1"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_USER]); 240 efl_content_set(efl_part(pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1], "elm.swallow.button1"), pd->button[EFL_UI_POPUP_ALERT_BUTTON_USER]);
220 efl_content_set(efl_part(obj, "buttons"), pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1]); 241 efl_content_set(efl_part(obj, "buttons"), pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1]);
221 } 242 }
@@ -230,13 +251,13 @@ _efl_ui_popup_alert_efl_object_constructor(Eo *obj,
230{ 251{
231 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); 252 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
232 253
254 if (!elm_widget_theme_klass_get(obj))
255 elm_widget_theme_klass_set(obj, "popup.alert");
233 obj = efl_constructor(efl_super(obj, MY_CLASS)); 256 obj = efl_constructor(efl_super(obj, MY_CLASS));
234 efl_canvas_object_type_set(obj, MY_CLASS_NAME); 257 efl_canvas_object_type_set(obj, MY_CLASS_NAME);
235 258
236 elm_widget_sub_object_parent_add(obj); 259 elm_widget_sub_object_parent_add(obj);
237 260
238 elm_layout_theme_set(efl_super(obj, MY_CLASS), "popup", "base", "alert");
239
240 return obj; 261 return obj;
241} 262}
242 263
diff --git a/src/lib/elementary/efl_ui_popup_anchor.c b/src/lib/elementary/efl_ui_popup_anchor.c
index d1b5672743..2fb571a0b2 100644
--- a/src/lib/elementary/efl_ui_popup_anchor.c
+++ b/src/lib/elementary/efl_ui_popup_anchor.c
@@ -352,6 +352,8 @@ _efl_ui_popup_anchor_efl_object_constructor(Eo *obj,
352{ 352{
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))
356 elm_widget_theme_klass_set(obj, "popup.anchor");
355 obj = efl_constructor(efl_super(obj, MY_CLASS)); 357 obj = efl_constructor(efl_super(obj, MY_CLASS));
356 efl_canvas_object_type_set(obj, MY_CLASS_NAME); 358 efl_canvas_object_type_set(obj, MY_CLASS_NAME);
357 359