forked from enlightenment/efl
make scroller fade in/out scrollbars only when u scroll and do it right.
SVN revision: 36548
This commit is contained in:
parent
f782b5dde5
commit
341805926d
|
@ -68,6 +68,24 @@ collections {
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
group { name: "elm/scroller/base/default";
|
group { name: "elm/scroller/base/default";
|
||||||
|
script {
|
||||||
|
public sbvis_v, sbvis_h, sbvis_timer;
|
||||||
|
public timer0(val) {
|
||||||
|
new v;
|
||||||
|
v = get_int(sbvis_v);
|
||||||
|
if (v) {
|
||||||
|
emit("do-hide-vbar", "");
|
||||||
|
set_int(sbvis_v, 0);
|
||||||
|
}
|
||||||
|
v = get_int(sbvis_h);
|
||||||
|
if (v) {
|
||||||
|
emit("do-hide-hbar", "");
|
||||||
|
set_int(sbvis_h, 0);
|
||||||
|
}
|
||||||
|
set_int(sbvis_timer, 0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
images {
|
images {
|
||||||
image: "shelf_inset.png" COMP;
|
image: "shelf_inset.png" COMP;
|
||||||
image: "bt_sm_base2.png" COMP;
|
image: "bt_sm_base2.png" COMP;
|
||||||
|
@ -305,46 +323,82 @@ collections {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
programs {
|
programs {
|
||||||
program { name: "sb_vbar_show";
|
program { name: "load";
|
||||||
|
signal: "load";
|
||||||
|
source: "";
|
||||||
|
script {
|
||||||
|
set_int(sbvis_h, 0);
|
||||||
|
set_int(sbvis_v, 0);
|
||||||
|
set_int(sbvis_timer, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
program { name: "vbar_show";
|
||||||
signal: "elm,action,show,vbar";
|
signal: "elm,action,show,vbar";
|
||||||
source: "elm";
|
source: "elm";
|
||||||
|
}
|
||||||
|
program { name: "vbar_hide";
|
||||||
|
signal: "elm,action,hide,vbar";
|
||||||
|
source: "elm";
|
||||||
|
}
|
||||||
|
program { name: "hbar_show";
|
||||||
|
signal: "elm,action,show,hbar";
|
||||||
|
source: "elm";
|
||||||
|
}
|
||||||
|
program { name: "hbar_hide";
|
||||||
|
signal: "elm,action,hide,hbar";
|
||||||
|
source: "elm";
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
program { name: "sb_vbar_show";
|
||||||
|
signal: "do-show-vbar";
|
||||||
|
source: "";
|
||||||
action: STATE_SET "default" 0.0;
|
action: STATE_SET "default" 0.0;
|
||||||
transition: LINEAR 1.0;
|
transition: LINEAR 1.0;
|
||||||
target: "sb_vbar_clip";
|
target: "sb_vbar_clip";
|
||||||
after: "sb_vbar_hide";
|
|
||||||
}
|
}
|
||||||
program { name: "sb_vbar_hide";
|
program { name: "sb_vbar_hide";
|
||||||
signal: "elm,action,hide,vbar";
|
signal: "do-hide-vbar";
|
||||||
source: "elm";
|
source: "";
|
||||||
action: STATE_SET "hidden" 0.0;
|
action: STATE_SET "hidden" 0.0;
|
||||||
transition: LINEAR 1.0;
|
transition: LINEAR 1.0;
|
||||||
target: "sb_vbar_clip";
|
target: "sb_vbar_clip";
|
||||||
}
|
}
|
||||||
program { name: "sb_hbar_show";
|
program { name: "sb_hbar_show";
|
||||||
signal: "elm,action,show,hbar";
|
signal: "do-show-hbar";
|
||||||
source: "elm";
|
source: "";
|
||||||
action: STATE_SET "default" 0.0;
|
action: STATE_SET "default" 0.0;
|
||||||
transition: LINEAR 1.0;
|
transition: LINEAR 1.0;
|
||||||
target: "sb_hbar_clip";
|
target: "sb_hbar_clip";
|
||||||
after: "sb_hbar_hide";
|
|
||||||
}
|
}
|
||||||
program { name: "sb_hbar_hide";
|
program { name: "sb_hbar_hide";
|
||||||
signal: "elm,action,hide,hbar";
|
signal: "do-hide-hbar";
|
||||||
source: "elm";
|
source: "";
|
||||||
action: STATE_SET "hidden" 0.0;
|
action: STATE_SET "hidden" 0.0;
|
||||||
transition: LINEAR 1.0;
|
transition: LINEAR 1.0;
|
||||||
target: "sb_hbar_clip";
|
target: "sb_hbar_clip";
|
||||||
}
|
}
|
||||||
// FIXME: check if visible and only if not - do this
|
|
||||||
program { name: "scroll";
|
program { name: "scroll";
|
||||||
signal: "elm,action,scroll";
|
signal: "elm,action,scroll";
|
||||||
source: "elm";
|
source: "elm";
|
||||||
action: STATE_SET "default" 0.0;
|
action: STATE_SET "default" 0.0;
|
||||||
transition: LINEAR 1.0;
|
script {
|
||||||
target: "sb_vbar_clip";
|
new v;
|
||||||
target: "sb_hbar_clip";
|
v = get_int(sbvis_v);
|
||||||
after: "sb_vbar_hide";
|
if (!v) {
|
||||||
after: "sb_hbar_hide";
|
emit("do-show-vbar", "");
|
||||||
|
set_int(sbvis_v, 1);
|
||||||
|
}
|
||||||
|
v = get_int(sbvis_h);
|
||||||
|
if (!v) {
|
||||||
|
emit("do-show-hbar", "");
|
||||||
|
set_int(sbvis_h, 1);
|
||||||
|
}
|
||||||
|
v = get_int(sbvis_timer);
|
||||||
|
if (v > 0) cancel_timer(v);
|
||||||
|
v = timer(2.0, "timer0", 0);
|
||||||
|
set_int(sbvis_timer, v);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
#include <Elementary.h>
|
||||||
|
#include "elm_priv.h"
|
Loading…
Reference in New Issue