elementary/widget - Apply current orientation mode styles. if it doesn't have, then apply the default.

Also whenever orientation mode is changed, the widget itself has orient signals.



SVN revision: 83945
This commit is contained in:
ChunEon Park 2013-02-15 11:06:19 +00:00
parent fdc3045369
commit cf2d0c9d6d
1 changed files with 23 additions and 1 deletions

View File

@ -4089,8 +4089,30 @@ _elm_widget_theme_object_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
const char *welement = va_arg(*list, const char *);
const char *wstyle = va_arg(*list, const char *);
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
Elm_Widget_Smart_Data *sd = _pd;
char buf[128];
*ret = _elm_theme_object_set(obj, edj, wname, welement, wstyle);
//Apply orientation styles.
switch (sd->orient_mode)
{
case 90: snprintf(buf, sizeof(buf), "%s/90", welement);
break;
case 180: snprintf(buf, sizeof(buf), "%s/180", welement);
break;
case 270: snprintf(buf, sizeof(buf), "%s/270", welement);
break;
default: strncpy(buf, welement, sizeof(buf));
break;
}
*ret = _elm_theme_object_set(obj, edj, wname, buf, wstyle);
if (!*ret)
{
*ret = _elm_theme_object_set(obj, edj, wname, welement, wstyle);
strncpy(buf, "elm,state,orient,default", sizeof(buf));
}
else
snprintf(buf, sizeof(buf), "elm,state,orient,%d", sd->orient_mode);
elm_object_signal_emit(obj, buf, "elm");
}
static void