add lyric scroller...needs better art?
This commit is contained in:
parent
f08482bd90
commit
0248e0dbcc
|
@ -873,6 +873,138 @@
|
|||
}
|
||||
}
|
||||
|
||||
group { name: "elm/scroller/entry/lyrics";
|
||||
images.image: "glow_bottom.png" COMP;
|
||||
images.image: "glow_top.png" COMP;
|
||||
script {
|
||||
public visible;
|
||||
}
|
||||
parts {
|
||||
part { name: "elm.dragable.vbar"; type: RECT; mouse_events: 0;
|
||||
dragable.x: 0 0 0;
|
||||
dragable.y: 1 1 0;
|
||||
description { state: "default";
|
||||
fixed: 1 1;
|
||||
color: 0 0 0 0;
|
||||
}
|
||||
}
|
||||
part { name: "elm.dragable.hbar"; type: RECT; mouse_events: 0;
|
||||
dragable.x: 0 0 0;
|
||||
dragable.y: 1 1 0;
|
||||
description { state: "default";
|
||||
fixed: 1 1;
|
||||
color: 0 0 0 0;
|
||||
}
|
||||
}
|
||||
part { name: "top_clip"; type: RECT;
|
||||
description { state: "default";
|
||||
color: 255 255 255 0;
|
||||
visible: 0;
|
||||
}
|
||||
description { state: "visible";
|
||||
color: 255 255 255 200;
|
||||
visible: 1;
|
||||
}
|
||||
}
|
||||
part { name: "glow_top"; mouse_events: 0; clip_to: "top_clip";
|
||||
description { state: "default";
|
||||
fixed: 0 1;
|
||||
min: 16 2;
|
||||
image.normal: "glow_top.png";
|
||||
aspect: 330 32;
|
||||
rel2.relative: 1 0;
|
||||
rel2.to_y: "elm.swallow.content";
|
||||
rel2.offset: -3 -1;
|
||||
rel1.offset: 2 4;
|
||||
}
|
||||
}
|
||||
program { name: "scr_eval";
|
||||
signal: "drag,set"; source: "elm.dragable.vbar";
|
||||
script {
|
||||
new Float:x, Float:y, Float:sx, Float:sy, Float:tx, Float:ty;
|
||||
|
||||
if (get_int(visible)) {
|
||||
get_drag(PART:"elm.dragable.vbar", x, y);
|
||||
get_drag_size(PART:"elm.dragable.vbar", sx, sy);
|
||||
get_drag_step(PART:"elm.dragable.vbar", tx, ty);
|
||||
if (y < sy) //FIXME this doesn't work right for some reason...
|
||||
run_program(get_program_id("bottom_visible"));
|
||||
else
|
||||
run_program(get_program_id("bottom_hidden"));
|
||||
if (y >= ty)
|
||||
run_program(get_program_id("top_visible"));
|
||||
else
|
||||
run_program(get_program_id("top_hidden"));
|
||||
}
|
||||
}
|
||||
}
|
||||
program { name: "top_visible";
|
||||
action: STATE_SET "visible" 0.0;
|
||||
target: "top_clip";
|
||||
transition: LINEAR 0.2;
|
||||
}
|
||||
program { name: "top_hidden";
|
||||
action: STATE_SET "default" 0.0;
|
||||
target: "top_clip";
|
||||
transition: LINEAR 0.2;
|
||||
}
|
||||
program { signal: "elm,action,show,vbar"; source: "elm";
|
||||
script {
|
||||
set_int(visible, 1);
|
||||
run_program(get_program_id("scr_eval"));
|
||||
}
|
||||
}
|
||||
program { signal: "elm,action,hide,vbar"; source: "elm";
|
||||
script {
|
||||
set_int(visible, 0);
|
||||
}
|
||||
after: "hide";
|
||||
}
|
||||
program { name: "hide";
|
||||
action: STATE_SET "default" 0.0;
|
||||
target: "top_clip";
|
||||
target: "bottom_clip";
|
||||
transition: LINEAR 0.2;
|
||||
}
|
||||
part { name: "bottom_clip"; type: RECT;
|
||||
description { state: "default";
|
||||
color: 255 255 255 0;
|
||||
visible: 0;
|
||||
}
|
||||
description { state: "visible";
|
||||
color: 255 255 255 200;
|
||||
visible: 1;
|
||||
}
|
||||
}
|
||||
part { name: "glow_bottom"; mouse_events: 0; clip_to: "bottom_clip";
|
||||
description { state: "default";
|
||||
fixed: 0 1;
|
||||
min: 16 2;
|
||||
image.normal: "glow_bottom.png";
|
||||
aspect: 330 32;
|
||||
rel1.relative: 0 1;
|
||||
rel1.to_y: "elm.swallow.content";
|
||||
rel1.offset: 2 0;
|
||||
rel2.offset: -3 -1;
|
||||
}
|
||||
}
|
||||
program { name: "bottom_visible";
|
||||
action: STATE_SET "visible" 0.0;
|
||||
target: "bottom_clip";
|
||||
transition: LINEAR 0.2;
|
||||
}
|
||||
program { name: "bottom_hidden";
|
||||
action: STATE_SET "default" 0.0;
|
||||
target: "bottom_clip";
|
||||
transition: LINEAR 0.2;
|
||||
}
|
||||
part { name: "elm.swallow.content"; type: SWALLOW;
|
||||
description { state: "default";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
group { name: "elm/entry/base-noedit-mixedwrap/lyrics";
|
||||
styles {
|
||||
style { name: "lyrics";
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
Loading…
Reference in New Issue