efl_ui_popup: apply new theme logic for alert_scroll, alert_text

This commit is contained in:
Sungtaek Hong 2017-11-29 21:54:24 +09:00
parent 22c5f771be
commit 5e4abdb873
5 changed files with 46 additions and 10 deletions

View File

@ -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";
}

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);