taxi2se pushed a commit to branch feature/eo_theme. http://git.enlightenment.org/core/efl.git/commit/?id=4f5cc3682c1e7c54b58e85d286718d64f734ce54
commit 4f5cc3682c1e7c54b58e85d286718d64f734ce54 Author: Sungtaek Hong <sth253.h...@samsung.com> Date: Wed Nov 29 21:54:24 2017 +0900 efl_ui_popup: apply new theme logic for alert_scroll, alert_text --- data/elementary/themes/edc/efl/popup.edc | 37 ++++++++++++++++++++------ src/lib/elementary/efl_ui_popup_alert.c | 2 +- src/lib/elementary/efl_ui_popup_alert_scroll.c | 6 +++++ src/lib/elementary/efl_ui_popup_alert_text.c | 9 +++++++ src/lib/elementary/efl_ui_popup_anchor.c | 2 +- 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"; } } -group { "efl/popup.alert"; +group { "efl/popup_alert"; + alias: "efl/popup_alert_scroll"; + alias: "efl/popup_alert_text"; images.image: "rounded_square.png" COMP; parts { image { "bg"; @@ -108,13 +110,15 @@ group { "efl/popup.alert"; } } -group { "efl/popup.anchor"; +group { "efl/popup_anchor"; inherit: "efl/popup"; } group { "efl/popup/backwall"; - alias: "efl/popup.alert/backwall"; - alias: "efl/popup.anchor/backwall"; + alias: "efl/popup_alert/backwall"; + alias: "efl/popup_alert_scroll/backwall"; + alias: "efl/popup_alert_text/backwall"; + alias: "efl/popup_anchor/backwall"; parts { rect { "base"; desc { "default"; @@ -163,14 +167,18 @@ group { "efl/popup/backwall"; } } -group { "efl/popup.alert/button_layout1"; +group { "efl/popup_alert/button_layout1"; + alias: "efl/popup_alert_scroll/button_layout1"; + alias: "efl/popup_alert_text/button_layout1"; parts { swallow { "elm.swallow.button1"; } } } -group { "efl/popup.alert/button_layout2"; +group { "efl/popup_alert/button_layout2"; + alias: "efl/popup_alert_scroll/button_layout2"; + alias: "efl/popup_alert_text/button_layout2"; parts { spacer { "div1"; desc { "default"; @@ -194,7 +202,9 @@ group { "efl/popup.alert/button_layout2"; } } -group { "efl/popup.alert/button_layout3"; +group { "efl/popup_alert/button_layout3"; + alias: "efl/popup_alert_scroll/button_layout3"; + alias: "efl/popup_alert_text/button_layout3"; parts { spacer { "div1"; desc { "default"; @@ -233,6 +243,17 @@ group { "efl/popup.alert/button_layout3"; } } -group { "efl/popup.alert/button"; +group { "efl/popup_alert/button"; inherit: "efl/button"; + alias: "efl/popup_alert_scroll/button"; + alias: "efl/popup_alert_text/button"; +} + +group { "efl/popup_alert_scroll/scroller"; + inherit: "elm/scroller/base/popup/no_inset_shadow"; + alias: "efl/popup_alert_text/scroller"; +} + +group { "efl/popup_alert_text/text"; + inherit: "efl/text"; } \ 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, ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); if (!elm_widget_theme_klass_get(obj)) - elm_widget_theme_klass_set(obj, "popup.alert"); + elm_widget_theme_klass_set(obj, "popup_alert"); obj = efl_constructor(efl_super(obj, MY_CLASS)); efl_canvas_object_type_set(obj, MY_CLASS_NAME); 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 @@ #define MY_CLASS EFL_UI_POPUP_ALERT_SCROLL_CLASS #define MY_CLASS_NAME "Efl.Ui.Popup.Alert.Scroll" +static const char PART_NAME_SCROLLER[] = "scroller"; + EOLIAN static void _efl_ui_popup_alert_scroll_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd EINA_UNUSED) { @@ -95,13 +97,17 @@ _efl_ui_popup_alert_scroll_efl_object_constructor(Eo *obj, { ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); + if (!elm_widget_theme_klass_get(obj)) + elm_widget_theme_klass_set(obj, "popup_alert_scroll"); obj = efl_constructor(efl_super(obj, MY_CLASS)); efl_canvas_object_type_set(obj, MY_CLASS_NAME); elm_widget_sub_object_parent_add(obj); + // TODO: Change internal component to Efl.Ui.Widget pd->scroller = elm_scroller_add(obj); elm_object_style_set(pd->scroller, "popup/no_inset_shadow"); + //elm_widget_element_update(obj, pd->scroller, PART_NAME_SCROLLER); elm_scroller_policy_set(pd->scroller, ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_AUTO); 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 @@ #define MY_CLASS EFL_UI_POPUP_ALERT_TEXT_CLASS #define MY_CLASS_NAME "Efl.Ui.Popup.Alert.Text" +static const char PART_NAME_SCROLLER[] = "scroller"; +static const char PART_NAME_TEXT[] = "text"; + EOLIAN static void _efl_ui_popup_alert_text_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Text_Data *pd EINA_UNUSED) { @@ -50,7 +53,9 @@ _efl_ui_popup_alert_text_text_set(Eo *obj, Efl_Ui_Popup_Alert_Text_Data *pd, con { if (!pd->message) { + // TODO: Change internal component to Efl.Ui.Widget pd->message = elm_label_add(obj); + //elm_widget_element_update(obj, pd->message, PART_NAME_TEXT); elm_label_line_wrap_set(pd->message, ELM_WRAP_MIXED); efl_gfx_size_hint_weight_set(pd->message, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); @@ -97,13 +102,17 @@ _efl_ui_popup_alert_text_efl_object_constructor(Eo *obj, { ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); + if (!elm_widget_theme_klass_get(obj)) + elm_widget_theme_klass_set(obj, "popup_alert_scroll"); obj = efl_constructor(efl_super(obj, MY_CLASS)); efl_canvas_object_type_set(obj, MY_CLASS_NAME); elm_widget_sub_object_parent_add(obj); + // TODO: Change internal component to Efl.Ui.Widget pd->scroller = elm_scroller_add(obj); elm_object_style_set(pd->scroller, "popup/no_inset_shadow"); + //elm_widget_element_update(obj, pd->scroller, PART_NAME_SCROLLER); elm_scroller_policy_set(pd->scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO); 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, ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); if (!elm_widget_theme_klass_get(obj)) - elm_widget_theme_klass_set(obj, "popup.anchor"); + elm_widget_theme_klass_set(obj, "popup_anchor"); obj = efl_constructor(efl_super(obj, MY_CLASS)); efl_canvas_object_type_set(obj, MY_CLASS_NAME); --