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_left.png \
|
||||||
downlight_glow_right.png \
|
downlight_glow_right.png \
|
||||||
disabler.png \
|
disabler.png \
|
||||||
live_bg_glow_in.png \
|
|
||||||
live_rel1_dragable.png \
|
|
||||||
live_rel2_dragable.png \
|
|
||||||
live_image.png \
|
live_image.png \
|
||||||
live_rectangle.png \
|
live_rectangle.png \
|
||||||
live_swallow.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: "shine.png" COMP;
|
||||||
image: "bub_over_bot.png" COMP;
|
image: "bub_over_bot.png" COMP;
|
||||||
image: "disabler.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: "bevel_out.png" COMP;
|
||||||
image: "pm_fill.png" COMP;
|
image: "pm_fill.png" COMP;
|
||||||
}
|
}
|
||||||
|
@ -1317,25 +1314,89 @@ group { name: "live_edit_layout";
|
||||||
rel2.to: "rel2_dragable";
|
rel2.to: "rel2_dragable";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
part { name: "symbol_frame";
|
part { name: "frame_l";
|
||||||
scale: 1;
|
type: RECT;
|
||||||
mouse_events: 0;
|
repeat_events: 1;
|
||||||
clip_to: "clipper";
|
|
||||||
description { state: "default" 0.0;
|
description { state: "default" 0.0;
|
||||||
image.normal: "live_bg_glow_in.png";
|
align: 0 0.5;
|
||||||
image.border: 1 1 1 1;
|
rel1.relative: 0 0;
|
||||||
|
rel2.relative: 0 1;
|
||||||
rel1.to: "elm.swallow.symbol";
|
rel1.to: "elm.swallow.symbol";
|
||||||
rel2.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";
|
part { name: "rel1_dragable";
|
||||||
scale: 1;
|
scale: 1;
|
||||||
clip_to: "clipper";
|
clip_to: "clipper";
|
||||||
|
type: RECT;
|
||||||
description { state: "default" 0.0;
|
description { state: "default" 0.0;
|
||||||
image.normal: "live_rel1_dragable.png";
|
min: 8 8;
|
||||||
image.border: 3 3 3 3;
|
fixed: 1 1;
|
||||||
min: 70 35;
|
rel1.relative: 0 0;
|
||||||
max: 70 35;
|
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 {
|
dragable {
|
||||||
confine: "base";
|
confine: "base";
|
||||||
|
@ -1348,10 +1409,12 @@ group { name: "live_edit_layout";
|
||||||
effect: GLOW;
|
effect: GLOW;
|
||||||
scale: 1;
|
scale: 1;
|
||||||
mouse_events: 0;
|
mouse_events: 0;
|
||||||
description {
|
description { state: "default" 0.0;
|
||||||
rel1.to: "rel1_dragable";
|
rel1.to: "rel1_dragable";
|
||||||
rel2.to: "rel1_dragable";
|
rel2.to_y: "rel1_dragable";
|
||||||
color: COL_HI;
|
rel1.relative: 1 0;
|
||||||
|
rel1.offset: 10 10;
|
||||||
|
color: 255 255 255 255;
|
||||||
align: 0 0.5;
|
align: 0 0.5;
|
||||||
fixed: 1 1;
|
fixed: 1 1;
|
||||||
text {
|
text {
|
||||||
|
@ -1366,11 +1429,18 @@ group { name: "live_edit_layout";
|
||||||
part { name: "rel2_dragable";
|
part { name: "rel2_dragable";
|
||||||
scale: 1;
|
scale: 1;
|
||||||
clip_to: "clipper";
|
clip_to: "clipper";
|
||||||
|
type: RECT;
|
||||||
description { state: "default" 0.0;
|
description { state: "default" 0.0;
|
||||||
image.normal: "live_rel2_dragable.png";
|
min: 8 8;
|
||||||
image.border: 3 3 3 3;
|
fixed: 1 1;
|
||||||
min: 70 35;
|
rel1.relative: 1 1;
|
||||||
max: 70 35;
|
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 {
|
dragable {
|
||||||
confine: "base";
|
confine: "base";
|
||||||
|
@ -1383,11 +1453,15 @@ group { name: "live_edit_layout";
|
||||||
effect: GLOW;
|
effect: GLOW;
|
||||||
scale: 1;
|
scale: 1;
|
||||||
mouse_events: 0;
|
mouse_events: 0;
|
||||||
description {
|
description { state: "default" 0.0;
|
||||||
rel1.to: "rel2_dragable";
|
rel1.to_y: "rel2_dragable";
|
||||||
|
rel1.offset: 0 -11;
|
||||||
rel2.to: "rel2_dragable";
|
rel2.to: "rel2_dragable";
|
||||||
color: COL_HI;
|
rel2.relative: 0 1;
|
||||||
|
rel2.offset: -11 -11;
|
||||||
|
color: 255 255 255 255;
|
||||||
align: 1 0.5;
|
align: 1 0.5;
|
||||||
|
fixed: 1 1;
|
||||||
text {
|
text {
|
||||||
font: FN;
|
font: FN;
|
||||||
size: 10;
|
size: 10;
|
||||||
|
@ -1397,7 +1471,7 @@ group { name: "live_edit_layout";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
part { name: "info_bg";
|
/* part { name: "info_bg";
|
||||||
type: RECT;
|
type: RECT;
|
||||||
scale: 1;
|
scale: 1;
|
||||||
mouse_events: 0;
|
mouse_events: 0;
|
||||||
|
@ -1423,7 +1497,7 @@ group { name: "live_edit_layout";
|
||||||
rel1.to: "info_bg";
|
rel1.to: "info_bg";
|
||||||
rel2.to: "info_bg";
|
rel2.to: "info_bg";
|
||||||
}
|
}
|
||||||
}
|
} */
|
||||||
}
|
}
|
||||||
programs {
|
programs {
|
||||||
program { name: "on_load_init";
|
program { name: "on_load_init";
|
||||||
|
@ -1434,17 +1508,40 @@ group { name: "live_edit_layout";
|
||||||
set_drag(PART:"rel2_dragable", 0.8, 0.8);
|
set_drag(PART:"rel2_dragable", 0.8, 0.8);
|
||||||
}
|
}
|
||||||
after: "on_load_show";
|
after: "on_load_show";
|
||||||
|
after: "anim";
|
||||||
}
|
}
|
||||||
program { name: "on_load_show";
|
program { name: "on_load_show";
|
||||||
action: STATE_SET "show" 0.0;
|
action: STATE_SET "show" 0.0;
|
||||||
target: "clipper";
|
target: "clipper";
|
||||||
target: "info_bg";
|
//target: "info_bg";
|
||||||
transition: DECELERATE 0.25;
|
transition: DECELERATE 0.25;
|
||||||
after: "emit_drag_signal";
|
after: "emit_drag_signal";
|
||||||
}
|
}
|
||||||
program { name: "emit_drag_signal";
|
program { name: "emit_drag_signal";
|
||||||
action: SIGNAL_EMIT "drag" "rel2_dragable";
|
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";
|
" W: %5d H: %5d";
|
||||||
|
|
||||||
#define LIVE_EDIT_NEW_PART_REL_STR_MAX_LEN 16
|
#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
|
static void
|
||||||
cur_part_value_update(live_data *ld, Evas_Object *edje)
|
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,
|
CTXPOPUP_ITEMS[ld->cur_part_data.type].name,
|
||||||
ld->cur_part_data.x, ld->cur_part_data.y,
|
ld->cur_part_data.x, ld->cur_part_data.y,
|
||||||
ld->cur_part_data.w, ld->cur_part_data.h);
|
ld->cur_part_data.w, ld->cur_part_data.h);
|
||||||
edje_object_part_text_set(layout,
|
// edje_object_part_text_set(layout,
|
||||||
"elm.text.info", part_info);
|
// "elm.text.info", part_info);
|
||||||
snprintf(part_info,
|
snprintf(part_info,
|
||||||
LIVE_EDIT_NEW_PART_REL_STR_MAX_LEN, LIVE_EDIT_NEW_PART_REL_STR,
|
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);
|
ld->cur_part_data.rel1_x, ld->cur_part_data.rel1_y);
|
||||||
|
|
Loading…
Reference in New Issue