forked from enlightenment/enventor
Live_Edit: Use template groups as background of new part in Drag-n-Drop mode
Summary: Created new groups to setup as bg for dragable area in Drag-n-Drop mode. Reviewers: Hermet Projects: #enventor Differential Revision: https://phab.enlightenment.org/D1323 Conflicts: src/bin/live_edit.c
This commit is contained in:
parent
afbf2db73a
commit
16d7d8847e
|
@ -8,4 +8,5 @@ collections {
|
|||
#include "theme_ext.edc"
|
||||
#include "layout_common.edc"
|
||||
#include "layout_setting.edc"
|
||||
#include "live_edit.edc"
|
||||
}
|
||||
|
|
|
@ -55,4 +55,5 @@ EXTRA_DIST = \
|
|||
downlight_glow_left.png \
|
||||
downlight_glow_right.png \
|
||||
alarm_highlight.png \
|
||||
disabler.png
|
||||
disabler.png \
|
||||
swallow_spacer_mask.png
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 154 B |
|
@ -1313,7 +1313,7 @@ group { name: "search_layout";
|
|||
}
|
||||
}
|
||||
|
||||
#define BG_COLOR 88 99 122
|
||||
#define BG_COLOR 255 255 255
|
||||
#define BORDER_COLOR 220 250 255
|
||||
#define REL_SIZE 70 35
|
||||
#define INFO_SIZE 130 50
|
||||
|
@ -1330,7 +1330,7 @@ group { name: "live_edit_layout";
|
|||
}
|
||||
}
|
||||
part { name: "new_part_bg";
|
||||
type: RECT;
|
||||
type: SWALLOW;
|
||||
scale: 1;
|
||||
description { state: "default" 0.0;
|
||||
color: BG_COLOR 0;
|
||||
|
@ -1339,7 +1339,7 @@ group { name: "live_edit_layout";
|
|||
}
|
||||
description { state: "show" 0.0;
|
||||
inherit:"default" 0.0;
|
||||
color: BG_COLOR 230;
|
||||
color: BG_COLOR 240;
|
||||
}
|
||||
}
|
||||
part { name: "new_part_bg_decorations";
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
images {
|
||||
image: "spacer.png" COMP;
|
||||
}
|
||||
group { name: "IMAGE_bg";
|
||||
parts {
|
||||
part { name: "logo";
|
||||
description { state: "default" 0.0;
|
||||
image.normal: "logo.png";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
group { name: "RECT_bg";
|
||||
parts {
|
||||
part { name: "rect";
|
||||
type: RECT;
|
||||
description { state: "default" 0.0;
|
||||
color: 0 136 170 255;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
group { name: "TEXT_bg";
|
||||
parts {
|
||||
part { name: "text";
|
||||
type: TEXT;
|
||||
description { state: "default" 0.0;
|
||||
color: 255 255 255 255;
|
||||
text {
|
||||
size: 10;
|
||||
font: "Sans";
|
||||
text: "TEXT";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
group { name: "TEXTBLOCK_bg";
|
||||
parts {
|
||||
part { name: "text";
|
||||
type: TEXTBLOCK;
|
||||
description { state: "default" 0.0;
|
||||
color: 255 255 255 255;
|
||||
text {
|
||||
size: 10;
|
||||
font: "Sans";
|
||||
text: "TEXTBLOCK";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
group { name: "SWALLOW_bg";
|
||||
parts {
|
||||
part { name: "bg";
|
||||
description { state: "default" 0.0;
|
||||
image.normal: "swallow.png";
|
||||
color: 255 255 255 155;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
group { name: "SPACER_bg";
|
||||
parts {
|
||||
part { name: "bg";
|
||||
description { state: "default" 0.0;
|
||||
image.normal: "spacer.png";
|
||||
fill.type: TILE;
|
||||
color: 255 255 255 50;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -166,6 +166,17 @@ new_part_mouse_up_cb(void *data EINA_UNUSED,
|
|||
new_part_mouse_move_cb);
|
||||
}
|
||||
|
||||
static void
|
||||
new_part_bg_set(live_data *ld)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
snprintf(buf, sizeof(buf), "%s_bg",
|
||||
MENU_ITEMS[ld->cur_part_data->type].name);
|
||||
Evas_Object *bg_layout = elm_layout_add(ld->layout);
|
||||
elm_layout_file_set(bg_layout, EDJE_PATH, buf);
|
||||
elm_object_part_content_set(ld->layout, "new_part_bg", bg_layout);
|
||||
}
|
||||
|
||||
static void
|
||||
live_edit_reset(live_data *ld)
|
||||
{
|
||||
|
@ -225,8 +236,9 @@ live_edit_layer_set(live_data *ld)
|
|||
ELM_CURSOR_TOP_LEFT_CORNER);
|
||||
elm_layout_part_cursor_set(layout, "rel2.dragable",
|
||||
ELM_CURSOR_BOTTOM_RIGHT_CORNER);
|
||||
part_info_update(ld);
|
||||
ld->layout = layout;
|
||||
new_part_bg_set(ld);
|
||||
part_info_update(ld);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -64,7 +64,7 @@ const char *TEMPLATE_PART_RECT[TEMPLATE_PART_RECT_LINE_CNT] =
|
|||
" scale: 1;<br/>",
|
||||
" mouse_events: 1;<br/>",
|
||||
" description { state: \"default\" 0.0;<br/>",
|
||||
" color: 255 255 255 255;<br/>",
|
||||
" color: 0 136 170 255;<br/>",
|
||||
" align: 0.5 0.5;<br/>",
|
||||
" fixed: 0 0;<br/>",
|
||||
" min: 0 0;<br/>",
|
||||
|
|
Loading…
Reference in New Issue