elm: Add main menu hover style

This allows the first level of an elm_menu to be styled as a menu bar

Patch by: Henrique Dante de Almeida <hdante@profusion.mobi>



SVN revision: 82954
This commit is contained in:
Henrique Dante de Almeida 2013-01-17 22:10:57 +00:00 committed by Bruno Dilly
parent 9bf0137e9e
commit 4d1b2785e2
1 changed files with 200 additions and 0 deletions

View File

@ -892,6 +892,206 @@ group { name: "elm/hover/base/submenu";
}
}
group { name: "elm/hover/base/main_menu";
parts {
part { name: "elm.swallow.offset";
type: SWALLOW;
description { state: "default" 0.0;
visible: 0;
fixed: 1 1;
}
}
part { name: "elm.swallow.size";
type: SWALLOW;
description { state: "default" 0.0;
align: 0.0 0.0;
rel2.relative: 0.0 0.0;
rel1.offset: 4 0;
fixed: 1 1;
}
}
part { name: "bottomclip";
type: RECT;
description { state: "default" 0.0;
rel1.offset: -1 -2;
}
}
part { name: "bottom";
clip_to: "bottomclip";
type: RECT;
description { state: "default" 0.0;
visible: 0;
rel1.to: "elm.swallow.slot.bottom";
rel1.offset: -5 -5;
rel2.to: "elm.swallow.slot.bottom";
rel2.offset: 4 4;
}
}
part { name: "elm.swallow.slot.bottom";
type: SWALLOW;
clip_to: "bottomclip";
description { state: "default" 0.0;
align: 0.5 1.0;
rel1.to: "elm.swallow.size";
rel1.relative: 0.0 1.0;
rel2.to: "elm.swallow.size";
fixed: 1 1;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
rel1.offset: 0 6;
rel2.offset: -1 6;
align: 0.5 0.0;
}
}
}
programs {
program { name: "bottomshow";
signal: "elm,action,slot,bottom,show";
source: "elm";
action: STATE_SET "visible" 0.0;
transition: DECELERATE 0.3;
target: "elm.swallow.slot.bottom";
}
}
}
group { name: "elm/hover/base/main_menu_submenu";
images {
image: "shad_circ.png" COMP;
image: "bt_dis_base.png" COMP;
}
parts {
part { name: "elm.swallow.offset";
type: SWALLOW;
repeat_events:1;
description { state: "default" 0.0;
align: 0.0 0.0;
rel2.relative: 0.0 0.0;
}
}
part { name: "elm.swallow.size";
type: SWALLOW;
description { state: "default" 0.0;
align: 0.0 0.0;
rel1.to: "elm.swallow.offset";
rel1.relative: 1.0 1.0;
rel2.to: "elm.swallow.offset";
}
}
part { name: "base";
type: RECT;
mouse_events: 1;
description { state: "default" 0.0;
color: 0 0 0 0;
}
}
part { name: "bottomclip";
type: RECT;
description { state: "default" 0.0;
rel1.to_y: "pop";
rel1.relative: 0.0 1.0;
rel1.offset: -1 -2;
}
}
part { name: "bottom";
clip_to: "bottomclip";
description { state: "default" 0.0;
visible: 0;
rel1.to: "elm.swallow.slot.bottom";
rel1.offset: -5 -5;
rel2.to: "elm.swallow.slot.bottom";
rel2.offset: 4 4;
image {
normal: "bt_dis_base.png";
border: 4 4 4 4;
}
image.middle: SOLID;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "elm.swallow.slot.bottom";
type: SWALLOW;
clip_to: "bottomclip";
description { state: "default" 0.0;
align: 0.5 1.0;
rel1.to: "elm.swallow.slot.middle";
rel1.relative: 0.0 1.0;
rel1.offset: 0 0;
rel2.to: "elm.swallow.slot.middle";
rel2.relative: 1.0 1.0;
rel2.offset: -1 0;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
rel1.offset: 0 6;
rel2.offset: -1 6;
align: 0.5 0.0;
}
}
part { name: "pop";
mouse_events: 1;
repeat_events:1;
description { state: "default" 0.0;
rel1.to: "elm.swallow.slot.middle";
rel1.offset: -5 -5;
rel2.to: "elm.swallow.slot.middle";
rel2.offset: 4 4;
image {
normal: "bt_dis_base.png";
border: 4 4 4 4;
}
}
}
part { name: "elm.swallow.slot.middle";
type: SWALLOW;
repeat_events:1;
description { state: "default" 0.0;
rel1.to: "elm.swallow.size";
rel2.to: "elm.swallow.size";
}
}
}
programs {
program { name: "end";
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;
transition: DECELERATE 0.3;
target: "bottom";
target: "elm.swallow.slot.bottom";
}
program { name: "bottomhide";
signal: "elm,action,slot,bottom,hide";
source: "elm";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.5;
target: "bottom";
target: "elm.swallow.slot.bottom";
}
}
}
group { name: "elm/hover/base/hoversel_vertical/default";
alias: "elm/hover/base/hoversel_vertical/entry";
images {