forked from enlightenment/enventor
bin/live_edit: improve ux
change ui draggable rel1, rel2 controls. remove info text make outline shiny
This commit is contained in:
parent
4c66c8a1c4
commit
2346693c0a
|
@ -55,9 +55,6 @@ EXTRA_DIST = \
|
|||
downlight_glow_left.png \
|
||||
downlight_glow_right.png \
|
||||
disabler.png \
|
||||
live_bg_glow_in.png \
|
||||
live_rel1_dragable.png \
|
||||
live_rel2_dragable.png \
|
||||
live_image.png \
|
||||
live_rectangle.png \
|
||||
live_swallow.png \
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 148 B |
Binary file not shown.
Before Width: | Height: | Size: 195 B |
Binary file not shown.
Before Width: | Height: | Size: 195 B |
|
@ -7,9 +7,6 @@ images {
|
|||
image: "shine.png" COMP;
|
||||
image: "bub_over_bot.png" COMP;
|
||||
image: "disabler.png" COMP;
|
||||
image: "live_rel1_dragable.png" COMP;
|
||||
image: "live_rel2_dragable.png" COMP;
|
||||
image: "live_bg_glow_in.png" COMP;
|
||||
image: "bevel_out.png" COMP;
|
||||
image: "pm_fill.png" COMP;
|
||||
}
|
||||
|
@ -1317,25 +1314,89 @@ group { name: "live_edit_layout";
|
|||
rel2.to: "rel2_dragable";
|
||||
}
|
||||
}
|
||||
part { name: "symbol_frame";
|
||||
scale: 1;
|
||||
mouse_events: 0;
|
||||
clip_to: "clipper";
|
||||
part { name: "frame_l";
|
||||
type: RECT;
|
||||
repeat_events: 1;
|
||||
description { state: "default" 0.0;
|
||||
image.normal: "live_bg_glow_in.png";
|
||||
image.border: 1 1 1 1;
|
||||
align: 0 0.5;
|
||||
rel1.relative: 0 0;
|
||||
rel2.relative: 0 1;
|
||||
rel1.to: "elm.swallow.symbol";
|
||||
rel2.to: "elm.swallow.symbol";
|
||||
min: 1 0;
|
||||
fixed: 1 0;
|
||||
}
|
||||
description { state: "anim" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 51 153 255 127;
|
||||
}
|
||||
}
|
||||
part { name: "frame_r";
|
||||
type: RECT;
|
||||
repeat_events: 1;
|
||||
description { state: "default" 0.0;
|
||||
align: 1 0.5;
|
||||
rel1.relative: 1 0;
|
||||
rel2.relative: 1 1;
|
||||
rel1.to: "elm.swallow.symbol";
|
||||
rel2.to: "elm.swallow.symbol";
|
||||
min: 1 0;
|
||||
fixed: 1 0;
|
||||
}
|
||||
description { state: "anim" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 51 153 255 127;
|
||||
}
|
||||
}
|
||||
part { name: "frame_t";
|
||||
type: RECT;
|
||||
repeat_events: 1;
|
||||
description { state: "default" 0.0;
|
||||
align: 0.5 0;
|
||||
rel1.relative: 0 0;
|
||||
rel2.relative: 1 0;
|
||||
rel1.to: "elm.swallow.symbol";
|
||||
rel2.to: "elm.swallow.symbol";
|
||||
min: 0 1;
|
||||
fixed: 0 1;
|
||||
}
|
||||
description { state: "anim" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 51 153 255 127;
|
||||
}
|
||||
}
|
||||
part { name: "frame_b";
|
||||
type: RECT;
|
||||
repeat_events: 1;
|
||||
description { state: "default" 0.0;
|
||||
align: 0.5 1;
|
||||
rel1.relative: 0 1;
|
||||
rel2.relative: 1 1;
|
||||
rel1.to: "elm.swallow.symbol";
|
||||
rel2.to: "elm.swallow.symbol";
|
||||
min: 0 1;
|
||||
fixed: 0 1;
|
||||
}
|
||||
description { state: "anim" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 51 153 255 127;
|
||||
}
|
||||
}
|
||||
part { name: "rel1_dragable";
|
||||
scale: 1;
|
||||
clip_to: "clipper";
|
||||
type: RECT;
|
||||
description { state: "default" 0.0;
|
||||
image.normal: "live_rel1_dragable.png";
|
||||
image.border: 3 3 3 3;
|
||||
min: 70 35;
|
||||
max: 70 35;
|
||||
min: 8 8;
|
||||
fixed: 1 1;
|
||||
rel1.relative: 0 0;
|
||||
rel2.relative: 0 0;
|
||||
align: 0 0;
|
||||
}
|
||||
description { state: "anim" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 51 153 255 255;
|
||||
//min: 10 10;
|
||||
}
|
||||
dragable {
|
||||
confine: "base";
|
||||
|
@ -1348,10 +1409,12 @@ group { name: "live_edit_layout";
|
|||
effect: GLOW;
|
||||
scale: 1;
|
||||
mouse_events: 0;
|
||||
description {
|
||||
description { state: "default" 0.0;
|
||||
rel1.to: "rel1_dragable";
|
||||
rel2.to: "rel1_dragable";
|
||||
color: COL_HI;
|
||||
rel2.to_y: "rel1_dragable";
|
||||
rel1.relative: 1 0;
|
||||
rel1.offset: 10 10;
|
||||
color: 255 255 255 255;
|
||||
align: 0 0.5;
|
||||
fixed: 1 1;
|
||||
text {
|
||||
|
@ -1366,11 +1429,18 @@ group { name: "live_edit_layout";
|
|||
part { name: "rel2_dragable";
|
||||
scale: 1;
|
||||
clip_to: "clipper";
|
||||
type: RECT;
|
||||
description { state: "default" 0.0;
|
||||
image.normal: "live_rel2_dragable.png";
|
||||
image.border: 3 3 3 3;
|
||||
min: 70 35;
|
||||
max: 70 35;
|
||||
min: 8 8;
|
||||
fixed: 1 1;
|
||||
rel1.relative: 1 1;
|
||||
rel2.relative: 1 1;
|
||||
align: 1 1;
|
||||
}
|
||||
description { state: "anim" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
color: 51 153 255 255;
|
||||
//min: 10 10;
|
||||
}
|
||||
dragable {
|
||||
confine: "base";
|
||||
|
@ -1383,11 +1453,15 @@ group { name: "live_edit_layout";
|
|||
effect: GLOW;
|
||||
scale: 1;
|
||||
mouse_events: 0;
|
||||
description {
|
||||
rel1.to: "rel2_dragable";
|
||||
description { state: "default" 0.0;
|
||||
rel1.to_y: "rel2_dragable";
|
||||
rel1.offset: 0 -11;
|
||||
rel2.to: "rel2_dragable";
|
||||
color: COL_HI;
|
||||
rel2.relative: 0 1;
|
||||
rel2.offset: -11 -11;
|
||||
color: 255 255 255 255;
|
||||
align: 1 0.5;
|
||||
fixed: 1 1;
|
||||
text {
|
||||
font: FN;
|
||||
size: 10;
|
||||
|
@ -1397,7 +1471,7 @@ group { name: "live_edit_layout";
|
|||
}
|
||||
}
|
||||
}
|
||||
part { name: "info_bg";
|
||||
/* part { name: "info_bg";
|
||||
type: RECT;
|
||||
scale: 1;
|
||||
mouse_events: 0;
|
||||
|
@ -1423,7 +1497,7 @@ group { name: "live_edit_layout";
|
|||
rel1.to: "info_bg";
|
||||
rel2.to: "info_bg";
|
||||
}
|
||||
}
|
||||
} */
|
||||
}
|
||||
programs {
|
||||
program { name: "on_load_init";
|
||||
|
@ -1434,17 +1508,40 @@ group { name: "live_edit_layout";
|
|||
set_drag(PART:"rel2_dragable", 0.8, 0.8);
|
||||
}
|
||||
after: "on_load_show";
|
||||
after: "anim";
|
||||
}
|
||||
program { name: "on_load_show";
|
||||
action: STATE_SET "show" 0.0;
|
||||
target: "clipper";
|
||||
target: "info_bg";
|
||||
//target: "info_bg";
|
||||
transition: DECELERATE 0.25;
|
||||
after: "emit_drag_signal";
|
||||
}
|
||||
program { name: "emit_drag_signal";
|
||||
action: SIGNAL_EMIT "drag" "rel2_dragable";
|
||||
}
|
||||
program { name: "anim";
|
||||
action: STATE_SET "anim" 0.0;
|
||||
target: "rel1_dragable";
|
||||
target: "rel2_dragable";
|
||||
target: "frame_l";
|
||||
target: "frame_r";
|
||||
target: "frame_t";
|
||||
target: "frame_b";
|
||||
transition: LINEAR 0.5;
|
||||
after: "anim2";
|
||||
}
|
||||
program { name: "anim2";
|
||||
action: STATE_SET "default" 0.0;
|
||||
target: "rel1_dragable";
|
||||
target: "rel2_dragable";
|
||||
target: "frame_l";
|
||||
target: "frame_r";
|
||||
target: "frame_t";
|
||||
target: "frame_b";
|
||||
transition: LINEAR 0.5;
|
||||
after: "anim";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ static const char *LIVE_EDIT_NEW_PART_DATA_STR =
|
|||
" W: %5d H: %5d";
|
||||
|
||||
#define LIVE_EDIT_NEW_PART_REL_STR_MAX_LEN 16
|
||||
static const char *LIVE_EDIT_NEW_PART_REL_STR = " %.2f %.2f";
|
||||
static const char *LIVE_EDIT_NEW_PART_REL_STR = "%.2f %.2f";
|
||||
|
||||
static void
|
||||
cur_part_value_update(live_data *ld, Evas_Object *edje)
|
||||
|
@ -83,8 +83,8 @@ part_info_update(live_data *ld)
|
|||
CTXPOPUP_ITEMS[ld->cur_part_data.type].name,
|
||||
ld->cur_part_data.x, ld->cur_part_data.y,
|
||||
ld->cur_part_data.w, ld->cur_part_data.h);
|
||||
edje_object_part_text_set(layout,
|
||||
"elm.text.info", part_info);
|
||||
// edje_object_part_text_set(layout,
|
||||
// "elm.text.info", part_info);
|
||||
snprintf(part_info,
|
||||
LIVE_EDIT_NEW_PART_REL_STR_MAX_LEN, LIVE_EDIT_NEW_PART_REL_STR,
|
||||
ld->cur_part_data.rel1_x, ld->cur_part_data.rel1_y);
|
||||
|
|
Loading…
Reference in New Issue