tools: improve tools ui.

This commit is contained in:
ChunEon Park 2014-09-02 19:53:20 +09:00
parent dd8a898c87
commit ff2eb4c3d1
2 changed files with 46 additions and 4 deletions

View File

@ -10,6 +10,8 @@ images {
image: "live_rel1_dragable.png" COMP;
image: "live_rel2_dragable.png" COMP;
image: "live_bg_glow_in.png" COMP;
image: "shine.png" COMP;
image: "bevel_in.png" COMP;
}
styles {
@ -2158,8 +2160,8 @@ group { name: "main_layout";
min: 640 440;
}
}
part { name: "elm.swallow.tools";
type: SWALLOW;
part { name: "tools_base";
type: SPACER;
scale: 1;
description { state: "default" 0.0;
rel1.relative: 0 0;
@ -2173,6 +2175,41 @@ group { name: "main_layout";
align: 0.5 0;
}
}
part { name: "elm.swallow.tools";
type: SWALLOW;
scale: 1;
description { state: "default" 0.0;
rel1.to: "tools_base";
rel2.to: "tools_base";
rel1.offset: 2 0;
rel2.offset: -4 -1;
}
}
part { name: "tools_shine";
type: IMAGE;
scale: 1;
mouse_events: 0;
description { state: "default" 0.0;
rel1 { to: "tools_base"; relative: 0 0; }
rel2 { to: "tools_base"; relative: 1 0; }
min: 0 1;
fixed: 0 1;
align: 0.5 0;
image.normal: "shine.png";
}
}
part { name: "tools_overlay";
type: IMAGE;
scale: 1;
mouse_events: 0;
description { state: "default" 0.0;
rel1 { to: "tools_base"; }
rel2 { to: "tools_base"; }
image.normal: "bevel_in.png";
image.border: 3 3 3 3;
image.border_scale: 1;
}
}
part { name: "elm.swallow.panes";
type: SWALLOW;
scale: 1;
@ -2228,13 +2265,13 @@ group { name: "main_layout";
program { name: "tools_show";
signal: "elm,state,tools,show";
action: STATE_SET "visible" 0.0;
target: "elm.swallow.tools";
target: "tools_base";
transition: DECELERATE 0.25;
}
program { name: "tools_hide";
signal: "elm,state,tools,hide";
action: STATE_SET "default" 0.0;
target: "elm.swallow.tools";
target: "tools_base";
transition: DECELERATE 0.25;
}
program { name: "alert_show";

View File

@ -97,6 +97,7 @@ tools_btn_create(Evas_Object *parent, const char *icon, const char *label,
{
Evas_Object *btn = elm_button_add(parent);
elm_object_style_set(btn, "anchor");
elm_object_focus_allow_set(btn, EINA_FALSE);
Evas_Object *img = elm_image_add(btn);
elm_image_file_set(img, EDJE_PATH, icon);
@ -166,6 +167,10 @@ tools_create(Evas_Object *parent, edit_data *ed)
evas_object_size_hint_align_set(btn, 0.0, EVAS_HINT_FILL);
elm_box_pack_end(box, btn);
sp = elm_separator_add(box);
evas_object_show(sp);
elm_box_pack_end(box, sp);
btn = tools_btn_create(box, "console", "Console", console_cb, NULL);
evas_object_size_hint_weight_set(btn, 0, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(btn, 1.0, EVAS_HINT_FILL);