inherit: "default" 0.0;
}
}
- // XXX: need to handle no icon mode
part { name: "elm.swallow.content"; type: SWALLOW; mouse_events: 0;
clip_to: "disabler";
scale: 1;
rel2.offset: 3 -5;
rel2.relative: 0.0 1.0;
}
+ description { state: "noicon" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
}
// XXX: check/radio goes next (right of) content, no radio/check handle
// XXX: need to handle no text?
// set_state(PART:"elm.text2", "default", 0.0);
}
}
+ program { name: "icon_show";
+ signal: "elm,state,icon,visible"; source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.swallow.content";
+ }
+ program { name: "icon_hide";
+ signal: "elm,state,icon,hidden"; source: "elm";
+ action: STATE_SET "noicon" 0.0;
+ target: "elm.swallow.content";
+ }
program { name: "selected";
signal: "elm,state,selected"; source: "elm";
action: STATE_SET "active" 0.0;
inherit: "default" 0.0;
}
}
- // XXX: need to handle no icon mode
part { name: "elm.swallow.content"; type: SWALLOW; mouse_events: 0;
clip_to: "disabler";
scale: 1;
rel2.offset: 3 -5;
rel2.relative: 0.0 1.0;
}
+ description { state: "noicon" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
}
// XXX: check/radio goes next (right of) content, no radio/check handle
// XXX: need to handle no text?
// set_state(PART:"elm.text2", "default", 0.0);
}
}
+ program { name: "icon_show";
+ signal: "elm,state,icon,visible"; source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.swallow.content";
+ }
+ program { name: "icon_hide";
+ signal: "elm,state,icon,hidden"; source: "elm";
+ action: STATE_SET "noicon" 0.0;
+ target: "elm.swallow.content";
+ }
program { name: "selected";
signal: "elm,state,selected"; source: "elm";
action: STATE_SET "active" 0.0;
ELM_MENU_ITEM_CHECK_OR_RETURN(it);
EINA_SAFETY_ON_NULL_RETURN(icon);
- if (!*icon) return;
- if ((item->icon_str) && (!strcmp(item->icon_str, icon))) return;
- if ((snprintf(icon_tmp, sizeof(icon_tmp), "menu/%s", icon) > 0) &&
+ if ((icon[0] != '\0') &&
+ (snprintf(icon_tmp, sizeof(icon_tmp), "menu/%s", icon) > 0) &&
(elm_icon_standard_set(item->content, icon_tmp) ||
elm_icon_standard_set(item->content, icon)))
{