static const char SIG_ITEM_FOCUSED[] = "item,focused";
static const char SIG_ITEM_UNFOCUSED[] = "item,unfocused";
+//TIZEN_ONLY(20161109): check theme compatibility more precise
+static const char STYLE_PRIORITY[4][15] = { "%s", "popup/%s", "default", "popup/default" };
+//
+
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
{SIG_BLOCK_CLICKED, ""},
{SIG_TIMEOUT, ""},
Elm_Popup_Item_Data *it;
Eina_List *elist;
char buf[1024], style[1024];
+ //TIZEN_ONLY(20161109): check theme compatibility more precise
+ int i;
+ //
_mirrored_set(obj, elm_widget_mirrored_get(obj));
{
Elm_Theme_Apply ret;
const char *obj_style = elm_widget_style_get(obj);
- sd->style_postfix = EINA_FALSE;
if (obj_style && !strcmp(obj_style, "default"))
ret = elm_widget_style_set(sd->notify, "popup");
ret = elm_widget_style_set(sd->notify, obj_style);
if (ret != ELM_THEME_APPLY_SUCCESS)
- {
- elm_widget_style_set(sd->notify, style);
- sd->style_postfix = EINA_TRUE;
- }
+ if (elm_widget_style_set(sd->notify, style) != ELM_THEME_APPLY_SUCCESS)
+ if (elm_widget_style_set(sd->notify, "popup") != ELM_THEME_APPLY_SUCCESS)
+ elm_widget_style_set(sd->notify, "popup/default");
}
/* END */
if (!elm_layout_theme_set(sd->action_area, "popup", buf, style))
CRI("Failed to set layout!");
*/
- snprintf(buf, sizeof(buf), "buttons%i%s", sd->last_button_number, (sd->style_postfix ? "/popup" : ""));
- if (!elm_layout_theme_set(sd->action_area, "popup", buf, elm_widget_style_get(obj)))
+ snprintf(buf, sizeof(buf), "buttons%i", sd->last_button_number);
+ for (i = 0; i < 4; i++)
+ {
+ snprintf(style, sizeof(style), STYLE_PRIORITY[i], elm_widget_style_get(obj));
+ if (_elm_layout_theme_set_internal(sd->action_area, "popup", buf, style) == ELM_THEME_APPLY_SUCCESS)
+ break;
+ }
+ if (i == 4)
CRI("Failed to set layout!");
/* END */
}
if (!elm_layout_theme_set(sd->content_area, "popup", "content", style))
CRI("Failed to set layout!");
*/
- if (!elm_layout_theme_set(sd->content_area, "popup", (sd->style_postfix ? "content/popup" : "content"), elm_widget_style_get(obj)))
+ for (i = 0; i < 4; i++)
+ {
+ snprintf(style, sizeof(style), STYLE_PRIORITY[i], elm_widget_style_get(obj));
+ if (_elm_layout_theme_set_internal(sd->content_area, "popup", "content", style) == ELM_THEME_APPLY_SUCCESS)
+ break;
+ }
+ if (i == 4)
CRI("Failed to set layout!");
+ snprintf(style, sizeof(style), "popup/%s", elm_widget_style_get(obj));
/* END */
if (sd->text_content_obj)
// TIZEN_ONLY(20160704): fix label theme problem
if (!elm_layout_theme_set(sd->action_area, "popup", buf, style))
CRI("Failed to set layout!");
*/
- snprintf(buf, sizeof(buf), "buttons%i%s", sd->last_button_number, (sd->style_postfix ? "/popup" : ""));
- if (!elm_layout_theme_set(sd->action_area, "popup", buf, elm_widget_style_get(obj)))
+ char style[1024];
+
+ snprintf(buf, sizeof(buf), "buttons%i", sd->last_button_number);
+ for (i = 0 ; i < 4; i++)
+ {
+ snprintf(style, sizeof(style), STYLE_PRIORITY[i], elm_widget_style_get(obj));
+ if (_elm_layout_theme_set_internal(sd->action_area, "popup", buf, style) == ELM_THEME_APPLY_SUCCESS)
+ break;
+ }
+ if (i == 4)
CRI("Failed to set layout!");
/* END */
}
Evas_Object *btn,
unsigned int idx)
{
- /* TIZEN_ONLY(20160707): remove unused variable
char buf[128], style[1024];
- */
- char buf[128];
- //
unsigned int i;
ELM_POPUP_DATA_GET(obj, sd);
if (!elm_layout_theme_set(sd->action_area, "popup", buf, style))
CRI("Failed to set layout!");
*/
- snprintf(buf, sizeof(buf), "buttons%i%s", sd->last_button_number, (sd->style_postfix ? "/popup" : ""));
- if (!elm_layout_theme_set(sd->action_area, "popup", buf, elm_widget_style_get(obj)))
+ snprintf(buf, sizeof(buf), "buttons%i", sd->last_button_number);
+ for (i = 0; i < 4; i++)
+ {
+ snprintf(style, sizeof(style), STYLE_PRIORITY[i], elm_widget_style_get(obj));
+ if (_elm_layout_theme_set_internal(sd->action_area, "popup", buf, style) == ELM_THEME_APPLY_SUCCESS)
+ break;
+ }
+ if (i == 4)
CRI("Failed to set layout!");
/* END */
_elm_popup_evas_object_smart_add(Eo *obj, Elm_Popup_Data *priv)
{
char style[1024];
+ //TIZEN_ONLY(20161109): check theme compatibility more precise
+ int i;
+ //
eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
elm_widget_sub_object_parent_add(obj);
{
Elm_Theme_Apply ret;
const char *obj_style = elm_widget_style_get(obj);
- priv->style_postfix = EINA_FALSE;
if (obj_style && !strcmp(obj_style, "default"))
ret = elm_widget_style_set(priv->notify, "popup");
ret = elm_widget_style_set(priv->notify, obj_style);
if (ret != ELM_THEME_APPLY_SUCCESS)
- {
- elm_widget_style_set(priv->notify, style);
- priv->style_postfix = EINA_TRUE;
- }
+ if (elm_widget_style_set(priv->notify, style) != ELM_THEME_APPLY_SUCCESS)
+ if (elm_widget_style_set(priv->notify, "popup") != ELM_THEME_APPLY_SUCCESS)
+ elm_widget_style_set(priv->notify, "popup/default");
}
/* END */
(priv->content_area, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_size_hints_changed_cb, priv->main_layout);
*/
- if (!elm_layout_theme_set(priv->content_area, "popup", (priv->style_postfix ? "content/popup" : "content"), elm_widget_style_get(obj)))
+ for (i = 0 ; i < 4; i++)
+ {
+ snprintf(style, sizeof(style), STYLE_PRIORITY[i], elm_widget_style_get(obj));
+ if (_elm_layout_theme_set_internal(priv->content_area, "popup", "content", style) == ELM_THEME_APPLY_SUCCESS)
+ break;
+ }
+ if (i == 4)
CRI("Failed to set layout!");
else
//TIZEN_ONLY(2016-06-23): fix popup align and size problem