raster pushed a commit to branch master.
commit 4d9268f6807d8d191989042172c844170a804615
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date: Sun Aug 11 22:20:46 2013 +0900
menus are now... better than a poke in the eye witrh a shapr stick.
but man does elm_menu need work. it's pretty close to not usable as a
proper menu system. submenus just flicker out of existence if you move
your mouse rong, things get stuck, no check/radio supported natively,
no proper alignment of content given icons, chjecks, arrows etc.
---
edje/dark.edc | 2 +-
edje/edc/elm/hover.edc | 167 +++++++++---
edje/edc/elm/menu.edc | 714 +++++++++++++++++++++++++++++++++----------------
edje/edc/menu.edc | 1 +
4 files changed, 610 insertions(+), 274 deletions(-)
diff --git a/edje/dark.edc b/edje/dark.edc
index bc917bb..fa3a2cf 100644
--- a/edje/dark.edc
+++ b/edje/dark.edc
@@ -74,7 +74,7 @@ collections {
//#include "edc/elm/gengrid.edc"
// XXX: hover 2 needs some serious work! :)
#include "edc/elm/hover.edc"
-// needs design work
+// XXX: needs design work !!!! hoversel not looking too good.!!!! arrows too
small, hoversel popup too big.
//#include "edc/elm/hoversel.edc"
// desktop in general
diff --git a/edje/edc/elm/hover.edc b/edje/edc/elm/hover.edc
index 4596864..7da9b87 100644
--- a/edje/edc/elm/hover.edc
+++ b/edje/edc/elm/hover.edc
@@ -435,6 +435,23 @@ group { name: "elm/hover/base/popout";
}
}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
//In the hover used by the menu only the bottom part is used.
group { name: "elm/hover/base/menu";
images {
@@ -460,14 +477,10 @@ group { name: "elm/hover/base/menu";
rel2.relative: 1.0 1.0;
}
}
- part { name: "base"; type: RECT; mouse_events: 1;
+ part { name: "base"; type: RECT;
description { state: "default" 0.0;
color: 0 0 0 0;
}
- description { state: "visible" 0.0;
- inherit: "default" 0.0;
- color: 0 0 0 64;
- }
}
part { name: "elm.swallow.slot.left"; type: SWALLOW;
description { state: "default" 0.0;
@@ -601,16 +614,6 @@ group { name: "elm/hover/base/menu";
signal: "mouse,up,1"; source: "base";
action: SIGNAL_EMIT "elm,action,dismiss" "";
}
- program { name: "show";
- signal: "elm,action,show"; source: "elm";
- action: STATE_SET "visible" 0.0;
- target: "base";
- }
- program { name: "hide";
- signal: "elm,action,hide"; source: "elm";
- action: STATE_SET "default" 0.0;
- target: "base";
- }
program { name: "bottomshow";
signal: "elm,action,slot,bottom,show"; source: "elm";
action: STATE_SET "visible" 0.0;
@@ -652,6 +655,8 @@ group { name: "elm/hover/base/submenu";
}
group { name: "elm/hover/base/main_menu";
+ images.image: "vgrad_med_lighter.png" COMP;
+ images.image: "bevel_out.png" COMP;
parts {
part { name: "elm.swallow.offset"; type: SWALLOW;
description { state: "default" 0.0;
@@ -663,7 +668,7 @@ group { name: "elm/hover/base/main_menu";
description { state: "default" 0.0;
align: 0.0 0.0;
rel2.relative: 0.0 0.0;
- rel1.offset: 4 0;
+ rel1.offset: 0 0;
fixed: 1 1;
}
}
@@ -672,30 +677,46 @@ group { name: "elm/hover/base/main_menu";
rel1.offset: -1 -2;
}
}
+ part { name: "base";
+ description { state: "default" 0.0;
+ image.normal: "vgrad_med_lighter.png";
+ rel1.to_y: "bottom";
+ rel2.to_y: "bottom";
+ fill.smooth: 0;
+ TILED_HORIZ(120)
+ }
+ }
+ part { name: "bevel"; mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to: "base";
+ rel2.to: "base";
+ image.normal: "bevel_out.png";
+ image.border: 1 1 1 1;
+ image.middle: 0;
+ fill.smooth: 0;
+ }
+ }
part { name: "bottom"; type: RECT;
clip_to: "bottomclip";
description { state: "default" 0.0;
visible: 0;
rel1.to: "elm.swallow.slot.bottom";
- rel1.offset: 0 -5;
+ rel1.offset: 0 0;
rel2.to: "elm.swallow.slot.bottom";
- rel2.offset: -1 4;
+ rel2.offset: -1 -1;
}
}
part { name: "elm.swallow.slot.bottom"; type: SWALLOW;
clip_to: "bottomclip";
description { state: "default" 0.0;
- align: 0.5 1.0;
+ align: 0.5 0.0;
rel1.to: "elm.swallow.size";
rel1.relative: 0.0 1.0;
rel2.to: "elm.swallow.size";
- fixed: 1 1;
+ fixed: 1 0;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
- rel1.offset: 0 6;
- rel2.offset: -1 6;
- align: 0.5 0.0;
}
}
}
@@ -710,9 +731,10 @@ group { name: "elm/hover/base/main_menu";
}
group { name: "elm/hover/base/main_menu_submenu";
- images {
- image: "vgrad_med.png" COMP;
- }
+ images.image: "vgrad_med_lighter.png" COMP;
+ images.image: "bevel_out.png" COMP;
+ images.image: "shine.png" COMP;
+ images.image: "win_shadow.png" COMP;
parts {
part { name: "elm.swallow.offset"; type: SWALLOW;
repeat_events:1;
@@ -741,23 +763,61 @@ group { name: "elm/hover/base/main_menu_submenu";
rel1.offset: -1 -2;
}
}
+ part { name: "shadow";
+ clip_to: "bottomclip";
+ description { state: "default" 0.0;
+ image.normal: "win_shadow.png";
+ image.border: 14 14 14 14;
+ image.middle: 0;
+ rel1.to: "bottom";
+ rel1.offset: -7 -3;
+ rel2.to: "bottom";
+ rel2.offset: 6 11;
+ fill.smooth: 0;
+ }
+ }
+ part { name: "top";
+ clip_to: "bottomclip";
+ description { state: "default" 0.0;
+ image.normal: "vgrad_med_lighter.png";
+ rel1.to: "bottom";
+ rel2.to_x: "bottom";
+ rel2.to_y: "shine";
+ rel2.offset: -1 0;
+ min: 0 23;
+ align: 0.0 0.0;
+ fill.smooth: 0;
+ TILED_HORIZ(120)
+ fixed: 0 1;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ }
+ }
+ part { name: "bg"; type: RECT; mouse_events: 0;
+ clip_to: "bottomclip";
+ description { state: "default" 0.0;
+ rel1.to_x: "bottom";
+ rel1.to_y: "top";
+ rel1.relative: 0.0 1.0;
+ rel2.to: "bottom";
+ color: 64 64 64 255;
+ }
+ }
part { name: "bottom";
clip_to: "bottomclip";
description { state: "default" 0.0;
- visible: 0;
rel1.to: "elm.swallow.slot.bottom";
- rel1.offset: -5 -5;
+ rel1.offset: 0 -6;
rel2.to: "elm.swallow.slot.bottom";
- rel2.offset: 4 4;
- image {
- normal: "vgrad_med.png";
- border: 4 4 4 4;
- middle: SOLID;
- }
+ rel2.offset: -1 4;
+ image.normal: "bevel_out.png";
+ image.border: 1 1 1 1;
+ image.middle: 0;
+ fill.smooth: 0;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
- visible: 1;
}
}
part { name: "elm.swallow.slot.bottom"; type: SWALLOW;
@@ -786,16 +846,16 @@ group { name: "elm/hover/base/main_menu_submenu";
rel2.to: "elm.swallow.slot.middle";
rel1.relative: 0.0 1.0;
rel2.offset: -1 0;
- color: 120 120 120 255;
+ visible: 0;
}
}
- part { name: "shine"; mouse_events: 1;
- repeat_events:1;
+ part { name: "shine"; mouse_events: 0;
+ clip_to: "bottomclip";
description { state: "default" 0.0;
- rel1.to: "elm.swallow.slot.middle";
+ rel1.to: "bottom";
rel1.offset: 0 -2;
- rel2.to: "elm.swallow.slot.middle";
- rel1.relative: 0.0 1.0;
+ rel2.to: "bottom";
+ rel2.relative: 1.0 0.0;
rel2.offset: -1 2;
image.normal: "shine.png";
FIXED_SIZE(69, 5)
@@ -841,6 +901,31 @@ group { name: "elm/hover/base/main_menu_submenu";
}
}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
group { name: "elm/hover/base/hoversel_vertical/default";
alias: "elm/hover/base/hoversel_vertical/entry";
images {
diff --git a/edje/edc/elm/menu.edc b/edje/edc/elm/menu.edc
index aaf9684..111f239 100644
--- a/edje/edc/elm/menu.edc
+++ b/edje/edc/elm/menu.edc
@@ -1,23 +1,23 @@
group { name: "elm/menu/item/default";
- images {
- image: "vgrad_med_lighter.png" COMP;
- image: "vgrad_med_dark.png" COMP;
- image: "shine.png" COMP;
- }
+ images.image: "vgrad_med_dark.png" COMP;
+ images.image: "bevel_horiz_out.png" COMP;
+ images.image: "shadow_rounded_horiz.png" COMP;
+ images.image: "shine.png" COMP;
script {
public menu_text_visible; //0:hide (default), 1:visible
public menu_disable; //0:enable, 1:disable
}
parts {
- part { name: "item_image";
+ part { name: "shadow"; mouse_events: 0;
description { state: "default" 0.0;
- visible: 0;
- image.normal: "vgrad_med_lighter.png";
+ image.normal: "shadow_rounded_horiz.png";
+ image.border: 0 0 9 9;
+ rel1.offset: 0 -4;
+ rel2.offset: -1 5;
fill.smooth: 0;
- TILED_HORIZ(120)
- fixed: 0 1;
+ visible: 0;
}
- description { state: "visible" 0.0;
+ description { state: "active" 0.0;
inherit: "default" 0.0;
visible: 1;
}
@@ -25,16 +25,14 @@ group { name: "elm/menu/item/default";
inherit: "default" 0.0;
}
}
- part { name: "item_image2";
+ part { name: "base"; mouse_events: 0;
description { state: "default" 0.0;
- visible: 0;
- rel1.offset: 0 1;
image.normal: "vgrad_med_dark.png";
fill.smooth: 0;
TILED_HORIZ(120)
- fixed: 0 1;
+ visible: 0;
}
- description { state: "visible" 0.0;
+ description { state: "active" 0.0;
inherit: "default" 0.0;
visible: 1;
}
@@ -42,88 +40,142 @@ group { name: "elm/menu/item/default";
inherit: "default" 0.0;
}
}
- part { name: "elm.swallow.content"; type: SWALLOW;
+ // XXX: need to handle no icon mode
+ part { name: "elm.swallow.content"; type: SWALLOW; mouse_events: 0;
clip_to: "disabler";
+ scale: 1;
description { state: "default" 0.0;
+ min: 16 16;
fixed: 1 0;
- visible: 1;
align: 0.0 0.5;
- rel1.offset: 4 4;
+ rel1.offset: 3 3;
rel2.offset: 3 -5;
rel2.relative: 0.0 1.0;
- aspect: 1.0 1.0;
- aspect_preference: VERTICAL;
- rel2.offset: 4 -5;
}
}
- part { name: "elm.text"; type: TEXT; mouse_events: 0;
- clip_to: "disabler";
+ // XXX: check/radio goes next (right of) content, no radio/check handle
+ // XXX: need to handle no text?
+ // XXX: need arrowspace on/off based on submenus in menu
+ part { name: "arrowspace"; type: SPACER;
scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ min: 15 15;
+ max: 15 15;
+ rel1.offset: -2 0;
+ rel1.relative: 1.0 0.0;
+ rel2.offset: -2 -1;
+ align: 1.0 0.5;
+ }
+ }
+ part { name: "elm.text"; type: TEXT; mouse_events: 0;
effect: SHADOW BOTTOM;
+ scale: 1;
description { state: "default" 0.0;
- visible: 0;
rel1.to_x: "elm.swallow.content";
rel1.relative: 1.0 0.0;
- rel1.offset: 5 7;
- rel2.offset: -10 -8;
+ rel1.offset: 5 -1;
+ rel2.to_x: "arrowspace";
+ rel2.offset: -6 -1;
+ rel2.relative: 0.0 1.0;
color: FN_COL_DEFAULT;
- text {
- font: FN;
- size: 10;
+ text { font: FN; size: 10;
min: 1 1;
align: 0.0 0.5;
text_class: "menu_item";
}
}
- description { state: "visible" 0.0;
+ description { state: "active" 0.0;
inherit: "default" 0.0;
- visible: 1;
+ visible: 0;
}
- description { state: "selected" 0.0;
- inherit: "visible" 0.0;
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
visible: 0;
}
}
- part { name: "elm.text2"; type: TEXT; mouse_events: 0;
+ part { name: "label2"; type: TEXT; mouse_events: 0;
+ effect: SHADOW BOTTOM;
scale: 1;
- effect: GLOW;
description { state: "default" 0.0;
- visible: 0;
- rel1.to_x: "elm.swallow.content";
- rel1.relative: 1.0 0.0;
- rel1.offset: 3 5;
- rel2.offset: -10 -8;
- color: FN_COL_HIGHLIGHT;
- text {
- font: FN;
- size: 10;
- min: 1 1;
+ rel1.to: "elm.text";
+ rel2.to: "elm.text";
+ color: 21 21 21 255;
+ color3: 255 255 255 25;
+ color_class: "menu_item_disabled";
+ text { font: FN; size: 10;
+ text_source: "elm.text";
align: 0.0 0.5;
+ text_class: "menu_item";
+ }
+ visible: 0;
+ }
+ description { state: "active" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ part { name: "label3"; type: TEXT; mouse_events: 0;
+ effect: GLOW;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.offset: -2 -3;
+ rel1.to: "elm.text";
+ rel2.offset: 2 1;
+ rel2.to: "elm.text";
+ color: 51 153 255 255;
+ color2: 51 153 255 24;
+ color3: 51 153 255 18;
+ color_class: "menu_item_active";
+ text { font: FN; size: 10;
text_source: "elm.text";
+ align: 0.0 0.5;
text_class: "menu_item";
}
+ visible: 0;
}
- description { state: "visible" 0.0;
+ description { state: "active" 0.0;
inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "bevel"; mouse_events: 0;
+ description { state: "default" 0.0;
+ image.normal: "bevel_horiz_out.png";
+ image.border: 0 0 2 2;
+ image.middle: 0;
+ fill.smooth: 0;
+ visible: 0;
}
- description { state: "selected" 0.0;
+ description { state: "active" 0.0;
inherit: "default" 0.0;
visible: 1;
}
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ }
}
part { name: "shine";
repeat_events: 1;
description { state: "default" 0.0;
- visible: 0;
- rel1.to: "item_image";
+ rel1.to: "base";
rel1.offset: 0 -2;
- rel2.to: "item_image";
+ rel2.to: "base";
rel2.relative: 1.0 0.0;
rel2.offset: -1 2;
image.normal: "shine.png";
+ visible: 0;
FIXED_SIZE(69, 5)
}
- description { state: "visible" 0.0;
+ description { state: "active" 0.0;
inherit: "default" 0.0;
visible: 1;
}
@@ -132,7 +184,6 @@ group { name: "elm/menu/item/default";
}
}
part { name: "event"; type: RECT;
- repeat_events: 1;
ignore_flags: ON_HOLD;
description { state: "default" 0.0;
color: 255 255 255 0;
@@ -148,83 +199,25 @@ group { name: "elm/menu/item/default";
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
- color: 150 150 150 255;
- visible: 1;
+ color: 255 255 255 128;
}
}
}
programs {
program {
- name: "item_mouse_in";
signal: "mouse,in"; source: "event";
action: SIGNAL_EMIT "elm,action,activate" "";
- after: "item_mouse_in_2";
- after: "item_mouse_in_3";
+ after: "selected";
}
program {
- name: "item_mouse_in_2";
- script {
- new v, d;
- v = get_int(menu_text_visible);
- d = get_int(menu_disable);
-
- if (v==1 && d==0)
- run_program(PROGRAM:"selected_text");
- }
- }
- program {
- name: "item_mouse_in_3";
- action : STATE_SET "visible" 0.0;
- target: "item_image";
- target: "item_image2";
- target: "shine";
- }
- program {
- name: "selected_text";
- action: STATE_SET "selected" 0.0;
- target: "elm.text";
- target: "elm.text2";
- }
- program {
- name: "item_mouse_out";
signal: "mouse,out"; source: "event";
- action: SIGNAL_EMIT "elm,action,inactivate" "";
- after: "item_mouse_out_2";
- after: "item_mouse_out_3";
- }
- program {
- name: "item_mouse_out_2";
- script {
- new v, d;
- v = get_int(menu_text_visible);
- d = get_int(menu_disable);
-
- if (v==1 && d==0)
- run_program(PROGRAM:"visible_text");
- }
- }
- program {
- name: "item_mouse_out_3";
- action: STATE_SET "default" 0.0;
- target: "item_image";
- target: "item_image2";
- target: "shine";
- }
- program {
- name: "visible_text";
- action: STATE_SET "visible" 0.0;
- target: "elm.text";
- target: "elm.text2";
+// action: SIGNAL_EMIT "elm,action,inactivate" "";
+ after: "unselected";
}
- program {
- name: "item_unclick";
- signal: "mouse,up,1"; source: "shine";
- action: STATE_SET "visible" 0.0;
- target: "item_image";
- target: "item_image2";
+ program { signal: "mouse,down,1"; source: "event";
+ after: "selected";
}
program {
- name: "item_unclick2";
signal: "mouse,up,1"; source: "event";
action: SIGNAL_EMIT "elm,action,click" "";
}
@@ -232,84 +225,89 @@ group { name: "elm/menu/item/default";
signal: "elm,state,text,visible"; source: "elm";
script {
set_int(menu_text_visible, 1);
- set_state(PART:"elm.text", "visible", 0.0);
- set_state(PART:"elm.text2", "visible", 0.0);
+// set_state(PART:"elm.text", "active", 0.0);
+// set_state(PART:"elm.text2", "active", 0.0);
}
}
program { name: "text_hide";
signal: "elm,state,text,hidden"; source: "elm";
script {
set_int(menu_text_visible, 0);
- set_state(PART:"elm.text", "default", 0.0);
- set_state(PART:"elm.text2", "default", 0.0);
+// set_state(PART:"elm.text", "default", 0.0);
+// set_state(PART:"elm.text2", "default", 0.0);
}
}
- program { name: "disable";
- signal: "elm,state,disabled"; source: "elm";
- action: STATE_SET "disabled" 0.0;
- target: "item_image";
- target: "item_image2";
- target: "shine";
- target: "event";
- target: "disabler";
- }
- program { name: "item_select";
+ program { name: "selected";
signal: "elm,state,selected"; source: "elm";
- after: "item_mouse_in_2";
- after: "item_mouse_in_3";
+ action: STATE_SET "active" 0.0;
+ target: "shadow";
+ target: "base";
+ target: "bevel";
+ target: "shine";
+ target: "elm.text";
+ target: "label2";
+ target: "label3";
}
- program { name: "item_unselect";
+ program { name: "unselected";
signal: "elm,state,unselected"; source: "elm";
- after: "item_mouse_out_2";
- after: "item_mouse_out_3";
+ action: STATE_SET "default" 0.0;
+ target: "shadow";
+ target: "base";
+ target: "bevel";
+ target: "shine";
+ target: "elm.text";
+ target: "label2";
+ target: "label3";
}
- program { name: "enable";
+ program {
signal: "elm,state,enabled"; source: "elm";
action: STATE_SET "default" 0.0;
- target: "item_image";
+ target: "shadow";
+ target: "base";
+ target: "bevel";
target: "shine";
target: "event";
target: "disabler";
+ target: "elm.text";
+ target: "label2";
+ target: "label3";
+ }
+ program {
+ signal: "elm,state,disabled"; source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "shadow";
+ target: "base";
+ target: "bevel";
+ target: "shine";
+ target: "event";
+ target: "disabler";
+ target: "elm.text";
+ target: "label2";
+ target: "label3";
}
}
}
group { name: "elm/menu/item_with_submenu/default";
- alias: "elm/menu/main_menu_submenu/default";
inherit: "elm/menu/item/default";
+// alias: "elm/menu/main_menu_submenu/default";
images {
image: "sym_right_light_normal.png" COMP;
- image: "sym_left_light_normal.png" COMP;
image: "sym_right_glow_normal.png" COMP;
- image: "sym_left_glow_normal.png" COMP;
image: "vertical_separated_bar_glow.png" COMP;
}
parts {
part { name: "arrow";
insert_after: "item_image_disabled";
description { state: "default" 0.0;
- color: 255 255 255 255;
- align: 1.0 0.5;
- aspect: 1 1;
- aspect_preference: BOTH;
- min: 15 15;
- max: 15 15;
- image {
- normal: "sym_right_light_normal.png";
- }
+ rel1.to: "arrowspace";
+ rel2.to: "arrowspace";
+ image.normal: "sym_right_light_normal.png";
}
- description { state: "rtl" 0.0;
- inherit: "default" 0.0;
- image.normal: "sym_left_light_normal.png";
- }
- description { state: "glow_ltr" 0.0;
+ description { state: "active" 0.0;
inherit: "default" 0.0;
image.normal: "sym_right_glow_normal.png";
}
- description { state: "glow_rtl" 0.0;
- inherit: "default" 0.0;
- image.normal: "sym_left_glow_normal.png";
- }
}
part { name: "select_line";
repeat_events: 1;
@@ -324,117 +322,369 @@ group { name: "elm/menu/item_with_submenu/default";
}
fill.smooth : 0;
}
- description { state: "visible" 0.0;
+ description { state: "active" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
- part { name: "elm.text";
- description { state: "default";
- rel2.to_x: "arrow";
- rel2.relative: 0.0 1.0;
+ }
+ programs {
+ program { name: "selected";
+ target: "arrow";
+ target: "select_line";
+ }
+ program { name: "unselected";
+ target: "arrow";
+ target: "select_line";
+ }
+ program {
+ signal: "mouse,in"; source: "event";
+ action: SIGNAL_EMIT "elm,action,open" "";
+ }
+// program {
+// signal: "mouse,up,1"; source: "event";
+// action: SIGNAL_EMIT "elm,action,open" "";
+// }
+ }
+}
+
+group { name: "elm/menu/separator/default";
+ images {
+ image: "separator_horiz.png" COMP;
+ }
+ parts {
+ part { name: "separator";
+ description { state: "default" 0.0;
+ min: 2 2;
+ rel1.offset: 0 2;
+ rel2.offset: -1 -3;
+ image.normal: "separator_horiz.png";
+ fill.smooth: 0;
+ }
+ }
+ }
+}
+
+group { name: "elm/menu/main_menu_submenu/default";
+ images.image: "vgrad_med_dark.png" COMP;
+ images.image: "bevel_out.png" COMP;
+ images.image: "bevel_in.png" COMP;
+ images.image: "shadow_rounded_horiz.png" COMP;
+ images.image: "shine.png" COMP;
+ script {
+ public menu_text_visible; //0:hide (default), 1:visible
+ public menu_disable; //0:enable, 1:disable
+ }
+ parts {
+ part { name: "shadow"; mouse_events: 0;
+ description { state: "default" 0.0;
+ image.normal: "shadow_rounded_horiz.png";
+ image.border: 0 0 9 9;
+ rel1.offset: 0 -4;
+ rel2.offset: -1 5;
+ fill.smooth: 0;
+ visible: 0;
}
- description { state: "visible" 0.0;
+ description { state: "active" 0.0;
inherit: "default" 0.0;
visible: 1;
}
- description { state: "selected" 0.0;
- inherit: "visible" 0.0;
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ }
+ }
+ part { name: "base"; mouse_events: 0;
+ description { state: "default" 0.0;
+ image.normal: "vgrad_med_dark.png";
+ fill.smooth: 0;
+ TILED_HORIZ(120)
visible: 0;
}
- description { state: "disabled" 0.0;
+ description { state: "active" 0.0;
inherit: "default" 0.0;
- color: 0 0 0 128;
+ visible: 1;
}
- description { state: "disabled_visible" 0.0;
- inherit: "visible" 0.0;
- color: 0 0 0 128;
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
}
}
- part { name: "elm.text2";
- description { state: "default";
- rel2.to_x: "arrow";
+ // XXX: need to handle no icon mode
+ part { name: "elm.swallow.content"; type: SWALLOW; mouse_events: 0;
+ clip_to: "disabler";
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 16 16;
+ fixed: 1 0;
+ align: 0.0 0.5;
+ rel1.offset: 3 3;
+ rel2.offset: 3 -5;
rel2.relative: 0.0 1.0;
}
- description { state: "visible" 0.0;
+ }
+ // XXX: check/radio goes next (right of) content, no radio/check handle
+ // XXX: need to handle no text?
+ // XXX: need arrowspace on/off based on submenus in menu
+ part { name: "arrowspace"; type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ min: 15 15;
+ max: 15 15;
+ rel1.offset: -2 0;
+ rel1.relative: 1.0 0.0;
+ rel2.offset: -2 -1;
+ align: 1.0 0.5;
+ }
+ }
+ part { name: "elm.text"; type: TEXT; mouse_events: 0;
+ effect: SHADOW BOTTOM;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.to_x: "elm.swallow.content";
+ rel1.relative: 1.0 0.0;
+ rel1.offset: 5 -1;
+ rel2.to_x: "arrowspace";
+ rel2.offset: -6 -1;
+ rel2.relative: 0.0 1.0;
+ color: FN_COL_DEFAULT;
+ text { font: FN; size: 10;
+ min: 1 1;
+ align: 0.0 0.5;
+ text_class: "menu_item";
+ }
+ }
+ description { state: "active" 0.0;
inherit: "default" 0.0;
+ visible: 0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "label2"; type: TEXT; mouse_events: 0;
+ effect: SHADOW BOTTOM;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.to: "elm.text";
+ rel2.to: "elm.text";
+ color: 21 21 21 255;
+ color3: 255 255 255 25;
+ color_class: "menu_item_disabled";
+ text { font: FN; size: 10;
+ text_source: "elm.text";
+ align: 0.0 0.5;
+ text_class: "menu_item";
+ }
+ visible: 0;
}
- description { state: "selected" 0.0;
+ description { state: "active" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ description { state: "disabled" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
+ part { name: "label3"; type: TEXT; mouse_events: 0;
+ effect: GLOW;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.offset: -2 -3;
+ rel1.to: "elm.text";
+ rel2.offset: 2 1;
+ rel2.to: "elm.text";
+ color: 51 153 255 255;
+ color2: 51 153 255 24;
+ color3: 51 153 255 18;
+ color_class: "menu_item_active";
+ text { font: FN; size: 10;
+ text_source: "elm.text";
+ align: 0.0 0.5;
+ text_class: "menu_item";
+ }
+ visible: 0;
+ }
+ description { state: "active" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "bevel0"; mouse_events: 0;
+ clip_to: "bevelc";
+ description { state: "default" 0.0;
+ rel1.to: "bevel";
+ rel1.offset: -1 -1;
+ rel2.to: "bevel";
+ rel2.offset: 0 0;
+ image.normal: "bevel_in.png";
+ image.border: 2 2 2 2;
+ image.middle: 0;
+ fill.smooth: 0;
+ visible: 0;
+ }
+ description { state: "active" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ }
+ }
+ part { name: "bevelc"; type: RECT;
+ description { state: "default" 0.0;
+ rel1.to: "bevel";
+ rel1.offset: -1 0;
+ rel2.to: "bevel";
+ rel2.offset: 0 -1;
+ }
+ }
+ part { name: "bevel"; mouse_events: 0;
+ description { state: "default" 0.0;
+ image.normal: "bevel_out.png";
+ image.border: 2 2 2 2;
+ image.middle: 0;
+ fill.smooth: 0;
+ visible: 0;
+ }
+ description { state: "active" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ }
+ }
+ part { name: "shine";
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ rel1.to: "base";
+ rel1.offset: 0 -2;
+ rel2.to: "base";
+ rel2.relative: 1.0 0.0;
+ rel2.offset: -1 2;
+ image.normal: "shine.png";
+ visible: 0;
+ FIXED_SIZE(69, 5)
+ }
+ description { state: "active" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ }
+ }
+ part { name: "event"; type: RECT;
+ ignore_flags: ON_HOLD;
+ description { state: "default" 0.0;
+ color: 255 255 255 0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "disabler"; type: RECT;
+ description { state: "default" 0.0;
+ color: 255 255 255 255;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 128;
+ }
+ }
}
programs {
program {
- name: "item_mouse_in_3";
- target: "select_line";
- after: "glow_arrow";
+ signal: "mouse,in"; source: "event";
+ action: SIGNAL_EMIT "elm,action,activate" "";
+ after: "selected";
}
program {
- name: "glow_arrow";
- script {
- new st[31];
- new Float:vl;
- get_state(PART:"arrow", st, 30, vl);
- if (!strcmp(st, "default"))
- set_state(PART:"arrow", "glow_ltr", vl);
- else if (!strcmp(st, "rtl"))
- set_state(PART:"arrow", "glow_rtl", vl);
- }
+ signal: "mouse,out"; source: "event";
+// action: SIGNAL_EMIT "elm,action,inactivate" "";
+ after: "unselected";
}
- program {
- name: "item_mouse_out";
- action: SIGNAL_EMIT "null" "";
+ program { signal: "mouse,down,1"; source: "event";
+ after: "selected";
}
program {
- name: "item_mouse_out_3";
- target: "select_line";
- after: "default_arrow";
+ signal: "mouse,down,1"; source: "event";
+ action: SIGNAL_EMIT "elm,action,click" "";
}
- program {
- name: "default_arrow";
+ program { name: "text_show";
+ signal: "elm,state,text,visible"; source: "elm";
script {
- new st[31];
- new Float:vl;
- get_state(PART:"arrow", st, 30, vl);
- if (!strcmp(st, "glow_ltr"))
- set_state(PART:"arrow", "default", vl);
- else if (!strcmp(st, "glow_rtl"))
- set_state(PART:"arrow", "rtl", vl);
+ set_int(menu_text_visible, 1);
+// set_state(PART:"elm.text", "active", 0.0);
+// set_state(PART:"elm.text2", "active", 0.0);
}
}
- program {
- name: "menu_open";
- signal: "mouse,in"; source: "event";
- action: SIGNAL_EMIT "elm,action,open" "";
+ program { name: "text_hide";
+ signal: "elm,state,text,hidden"; source: "elm";
+ script {
+ set_int(menu_text_visible, 0);
+// set_state(PART:"elm.text", "default", 0.0);
+// set_state(PART:"elm.text2", "default", 0.0);
+ }
}
- program { name: "to_rtl";
- signal: "edje,state,rtl"; source: "edje";
- action: STATE_SET "rtl" 0.0;
- target: "arrow";
+ program { name: "selected";
+ signal: "elm,state,selected"; source: "elm";
+ action: STATE_SET "active" 0.0;
+ target: "shadow";
+ target: "base";
+ target: "bevel0";
+ target: "bevel";
+ target: "shine";
+ target: "elm.text";
+ target: "label2";
+ target: "label3";
}
- program { name: "to_ltr";
- signal: "edje,state,ltr"; source: "edje";
+ program { name: "unselected";
+ signal: "elm,state,unselected"; source: "elm";
action: STATE_SET "default" 0.0;
- target: "arrow";
+ target: "shadow";
+ target: "base";
+ target: "bevel0";
+ target: "bevel";
+ target: "shine";
+ target: "elm.text";
+ target: "label2";
+ target: "label3";
}
- }
-}
-
-group { name: "elm/menu/separator/default";
- images {
- image: "separator_horiz.png" COMP;
- }
- parts {
- part { name: "separator";
- description { state: "default" 0.0;
- min: 2 2;
- rel1.offset: 4 4;
- rel2.offset: -5 -5;
- image.normal: "separator_horiz.png";
- fill.smooth: 0;
- }
+ program {
+ signal: "elm,state,enabled"; source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "shadow";
+ target: "base";
+ target: "bevel0";
+ target: "bevel";
+ target: "shine";
+ target: "event";
+ target: "disabler";
+ target: "elm.text";
+ target: "label2";
+ target: "label3";
+ }
+ program {
+ signal: "elm,state,disabled"; source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "shadow";
+ target: "base";
+ target: "bevel0";
+ target: "bevel";
+ target: "shine";
+ target: "event";
+ target: "disabler";
+ target: "elm.text";
+ target: "label2";
+ target: "label3";
}
}
}
diff --git a/edje/edc/menu.edc b/edje/edc/menu.edc
index 4d76ca0..34d887f 100644
--- a/edje/edc/menu.edc
+++ b/edje/edc/menu.edc
@@ -226,6 +226,7 @@ group { name: "e/widgets/menu/default/icon";
}
part { name: "e.swallow.content"; type: SWALLOW;
clip_to: "clip";
+ scale: 1;
description { state: "default" 0.0;
min: 16 16;
rel1.offset: 2 2;
--
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk