group {
name: "elm/button/base/base_btn_index";
- inherit: "elm/button/base/base_btn_menu";
data.item: "focus_highlight" "on";
parts {
part {
scale: 1;
description {
state: "default" 0.0;
- min: 0 36;
color: 0 0 0 0;
- fixed: 0 1;
+ }
+ }
+ part {
+ name: "bg_text";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1.to: "elm.text";
+ rel2.to: "elm.text";
+ color: 0 0 0 0;
}
description {
state: "focused" 0.0;
description {
state: "default" 0.0;
rel1.to: "bg";
- rel2.to: "bg";
+ rel2 {
+ to: "bg";
+ relative: 0.0 0.0;
+ }
text {
font: FONT_LIGHT;
size: 36;
- align: 0.0 0.5;
+ min: 1 0;
+ align: 0.0 0.7;
+ ellipsis: -1;
}
- min: 82 0;
- align: 0.0 0.5;
- color: COLOR_TEXT_INDEX;
+ min: 0 36;
align: 0.0 0.0;
+ color: COLOR_TEXT_INDEX;
fixed: 1 1;
}
description {
}
}
}
+ programs {
+ program {
+ name: "focused";
+ signal: "elm,action,focus";
+ source: "elm";
+ action: STATE_SET "focused" 0.0;
+ target: "bg_text";
+ target: "elm.text";
+ transition: LINEAR TRANSITION_TIME;
+ }
+ program {
+ name: "unfocused";
+ signal: "elm,action,unfocus";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "bg_text";
+ target: "elm.text";
+ transition: LINEAR TRANSITION_TIME;
+ }
+ }
}
group {
Evas_Object *ly, *btn, *grid;
struct listmgr_data *data;
int size;
+ char buf[128];
data = lmgr->data;
}
elm_object_style_set(btn, STYLE_BTN_INDEX);
- elm_object_text_set(btn, gi->name);
+
+ snprintf(buf, sizeof(buf), " %s ", gi->name);
+ elm_object_text_set(btn, buf);
grid = util_add_gengrid(ly, data->grid_item_x, data->grid_item_y);
if (!grid) {