2011-08-02 07:07:53 -07:00
|
|
|
group { name: "elm/check/base/default";
|
|
|
|
images {
|
|
|
|
image: "check_base.png" COMP;
|
|
|
|
image: "check.png" COMP;
|
|
|
|
image: "check2.png" COMP;
|
|
|
|
}
|
|
|
|
parts {
|
|
|
|
part { name: "bg";
|
|
|
|
mouse_events: 0;
|
|
|
|
scale: 1;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
rel1.offset: 1 1;
|
|
|
|
rel2.relative: 0.0 1.0;
|
|
|
|
rel2.offset: 1 -2;
|
|
|
|
align: 0.0 0.5;
|
|
|
|
min: 16 16;
|
|
|
|
max: 16 16;
|
|
|
|
aspect: 1.0 1.0;
|
|
|
|
aspect_preference: VERTICAL;
|
|
|
|
image {
|
|
|
|
normal: "check_base.png";
|
|
|
|
border: 5 5 5 5;
|
|
|
|
middle: 0;
|
|
|
|
}
|
|
|
|
fill.smooth : 0;
|
2011-08-02 02:47:05 -07:00
|
|
|
}
|
2011-08-02 07:07:53 -07:00
|
|
|
}
|
|
|
|
part { name: "check";
|
|
|
|
mouse_events: 0;
|
|
|
|
scale: 1;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
rel1 {
|
|
|
|
to: "bg";
|
|
|
|
offset: 1 1;
|
|
|
|
}
|
|
|
|
rel2 {
|
|
|
|
to: "bg";
|
|
|
|
offset: -2 -2;
|
|
|
|
}
|
|
|
|
visible: 0;
|
|
|
|
color: 255 255 255 255;
|
|
|
|
image.normal: "check.png";
|
|
|
|
}
|
|
|
|
description { state: "visible" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
visible: 1;
|
|
|
|
}
|
|
|
|
description { state: "disabled" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
visible: 0;
|
|
|
|
color: 128 128 128 128;
|
|
|
|
}
|
|
|
|
description { state: "disabled_visible" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
color: 128 128 128 128;
|
|
|
|
visible: 1;
|
2011-08-02 02:47:05 -07:00
|
|
|
}
|
2011-08-02 07:07:53 -07:00
|
|
|
}
|
2012-05-02 18:19:05 -07:00
|
|
|
part { name: "elm.swallow.content";
|
2011-08-02 07:07:53 -07:00
|
|
|
type: SWALLOW;
|
2012-07-18 01:23:15 -07:00
|
|
|
scale: 1;
|
2011-08-02 07:07:53 -07:00
|
|
|
description { state: "default" 0.0;
|
|
|
|
fixed: 1 0;
|
|
|
|
visible: 0;
|
|
|
|
align: 0.0 0.5;
|
|
|
|
rel1.to_x: "bg";
|
|
|
|
rel1.relative: 1.0 0.0;
|
|
|
|
rel1.offset: 1 1;
|
|
|
|
rel2.to_x: "bg";
|
|
|
|
rel2.offset: 1 -2;
|
|
|
|
rel2.relative: 1.0 1.0;
|
|
|
|
}
|
|
|
|
description { state: "visible" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
fixed: 1 0;
|
|
|
|
visible: 1;
|
|
|
|
aspect: 1.0 1.0;
|
2012-07-18 01:23:15 -07:00
|
|
|
min: 16 16;
|
2011-08-02 07:07:53 -07:00
|
|
|
}
|
|
|
|
description { state: "disabled" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
2012-07-18 01:23:15 -07:00
|
|
|
color: 255 255 255 128;
|
2011-08-02 07:07:53 -07:00
|
|
|
}
|
|
|
|
description { state: "disabled_visible" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
2012-07-18 01:23:15 -07:00
|
|
|
color: 255 255 255 128;
|
2011-08-02 07:07:53 -07:00
|
|
|
fixed: 1 0;
|
|
|
|
visible: 1;
|
|
|
|
aspect: 1.0 1.0;
|
2011-08-02 02:47:05 -07:00
|
|
|
}
|
2011-08-02 07:07:53 -07:00
|
|
|
}
|
|
|
|
part { name: "elm.text";
|
|
|
|
type: TEXT;
|
|
|
|
mouse_events: 0;
|
|
|
|
scale: 1;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
visible: 0;
|
2012-05-02 18:19:05 -07:00
|
|
|
rel1.to_x: "elm.swallow.content";
|
2011-08-02 07:07:53 -07:00
|
|
|
rel1.relative: 1.0 0.0;
|
|
|
|
rel1.offset: 1 1;
|
|
|
|
rel2.relative: 1.0 1.0;
|
|
|
|
rel2.offset: -2 -2;
|
|
|
|
color: 0 0 0 255;
|
|
|
|
text {
|
|
|
|
font: "Sans,Edje-Vera";
|
|
|
|
size: 10;
|
|
|
|
min: 0 1;
|
|
|
|
align: -1.0 0.5;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
description { state: "visible" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
visible: 1;
|
|
|
|
text.min: 1 1;
|
|
|
|
}
|
|
|
|
description { state: "disabled" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
color: 0 0 0 128;
|
|
|
|
color3: 0 0 0 0;
|
|
|
|
}
|
|
|
|
description { state: "disabled_visible" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
color: 0 0 0 128;
|
|
|
|
color3: 0 0 0 0;
|
|
|
|
visible: 1;
|
|
|
|
text.min: 1 1;
|
2011-08-02 02:47:05 -07:00
|
|
|
}
|
2011-08-02 07:07:53 -07:00
|
|
|
}
|
|
|
|
part { name: "events";
|
|
|
|
type: RECT;
|
|
|
|
ignore_flags: ON_HOLD;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
color: 0 0 0 0;
|
2011-08-02 02:47:05 -07:00
|
|
|
}
|
2011-08-02 07:07:53 -07:00
|
|
|
}
|
|
|
|
part { name: "disabler";
|
|
|
|
type: RECT;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
color: 0 0 0 0;
|
|
|
|
visible: 0;
|
|
|
|
}
|
|
|
|
description { state: "disabled" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
visible: 1;
|
2011-08-02 02:47:05 -07:00
|
|
|
}
|
|
|
|
}
|
2011-08-02 07:07:53 -07:00
|
|
|
}
|
|
|
|
programs {
|
|
|
|
program { name: "click";
|
|
|
|
signal: "mouse,up,1";
|
|
|
|
source: "events";
|
|
|
|
action: SIGNAL_EMIT "elm,action,check,toggle" "";
|
|
|
|
}
|
|
|
|
program { name: "check_on";
|
|
|
|
signal: "elm,state,check,on";
|
|
|
|
source: "elm";
|
|
|
|
action: STATE_SET "visible" 0.0;
|
|
|
|
target: "check";
|
|
|
|
}
|
|
|
|
program { name: "check_off";
|
|
|
|
signal: "elm,state,check,off";
|
|
|
|
source: "elm";
|
|
|
|
action: STATE_SET "default" 0.0;
|
|
|
|
target: "check";
|
|
|
|
}
|
|
|
|
program { name: "text_show";
|
|
|
|
signal: "elm,state,text,visible";
|
|
|
|
source: "elm";
|
|
|
|
action: STATE_SET "visible" 0.0;
|
|
|
|
target: "elm.text";
|
|
|
|
}
|
|
|
|
program { name: "text_hide";
|
|
|
|
signal: "elm,state,text,hidden";
|
|
|
|
source: "elm";
|
|
|
|
action: STATE_SET "default" 0.0;
|
|
|
|
target: "elm.text";
|
|
|
|
}
|
|
|
|
program { name: "icon_show";
|
|
|
|
signal: "elm,state,icon,visible";
|
|
|
|
source: "elm";
|
|
|
|
action: STATE_SET "visible" 0.0;
|
2012-05-02 18:19:05 -07:00
|
|
|
target: "elm.swallow.content";
|
2011-08-02 07:07:53 -07:00
|
|
|
}
|
|
|
|
program { name: "icon_hide";
|
|
|
|
signal: "elm,state,icon,hidden";
|
|
|
|
source: "elm";
|
|
|
|
action: STATE_SET "default" 0.0;
|
2012-05-02 18:19:05 -07:00
|
|
|
target: "elm.swallow.content";
|
2011-08-02 07:07:53 -07:00
|
|
|
}
|
|
|
|
program { name: "disable";
|
|
|
|
signal: "elm,state,disabled";
|
|
|
|
source: "elm";
|
|
|
|
action: STATE_SET "disabled" 0.0;
|
|
|
|
target: "disabler";
|
|
|
|
after: "disable_text";
|
|
|
|
}
|
|
|
|
program { name: "disable_text";
|
|
|
|
script {
|
|
|
|
new st[31];
|
|
|
|
new Float:vl;
|
|
|
|
get_state(PART:"elm.text", st, 30, vl);
|
|
|
|
if (!strcmp(st, "visible"))
|
|
|
|
set_state(PART:"elm.text", "disabled_visible", 0.0);
|
|
|
|
else
|
|
|
|
set_state(PART:"elm.text", "disabled", 0.0);
|
2011-08-02 02:47:05 -07:00
|
|
|
|
2012-05-02 18:19:05 -07:00
|
|
|
get_state(PART:"elm.swallow.content", st, 30, vl);
|
2011-08-02 07:07:53 -07:00
|
|
|
if (!strcmp(st, "visible"))
|
2012-05-02 18:19:05 -07:00
|
|
|
set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
|
2011-08-02 07:07:53 -07:00
|
|
|
else
|
2012-05-02 18:19:05 -07:00
|
|
|
set_state(PART:"elm.swallow.content", "disabled", 0.0);
|
2011-08-02 02:47:05 -07:00
|
|
|
|
2011-08-02 07:07:53 -07:00
|
|
|
get_state(PART:"check", st, 30, vl);
|
|
|
|
if (!strcmp(st, "visible"))
|
|
|
|
set_state(PART:"check", "disabled_visible", 0.0);
|
|
|
|
else
|
|
|
|
set_state(PART:"check", "disabled", 0.0);
|
2011-08-02 02:47:05 -07:00
|
|
|
}
|
2011-08-02 07:07:53 -07:00
|
|
|
}
|
|
|
|
program { name: "enable";
|
|
|
|
signal: "elm,state,enabled";
|
|
|
|
source: "elm";
|
|
|
|
action: STATE_SET "default" 0.0;
|
|
|
|
target: "disabler";
|
|
|
|
after: "enable_text";
|
|
|
|
}
|
|
|
|
program { name: "enable_text";
|
|
|
|
script {
|
|
|
|
new st[31];
|
|
|
|
new Float:vl;
|
|
|
|
get_state(PART:"elm.text", st, 30, vl);
|
|
|
|
if (!strcmp(st, "disabled_visible"))
|
|
|
|
set_state(PART:"elm.text", "visible", 0.0);
|
|
|
|
else
|
|
|
|
set_state(PART:"elm.text", "default", 0.0);
|
2011-08-02 02:47:05 -07:00
|
|
|
|
2012-05-02 18:19:05 -07:00
|
|
|
get_state(PART:"elm.swallow.content", st, 30, vl);
|
2011-08-02 07:07:53 -07:00
|
|
|
if (!strcmp(st, "visible"))
|
2012-05-02 18:19:05 -07:00
|
|
|
set_state(PART:"elm.swallow.content", "visible", 0.0);
|
2011-08-02 07:07:53 -07:00
|
|
|
else
|
2012-05-02 18:19:05 -07:00
|
|
|
set_state(PART:"elm.swallow.content", "default", 0.0);
|
2011-08-02 02:47:05 -07:00
|
|
|
|
2011-08-02 07:07:53 -07:00
|
|
|
get_state(PART:"check", st, 30, vl);
|
|
|
|
if (!strcmp(st, "visible"))
|
|
|
|
set_state(PART:"check", "visible", 0.0);
|
|
|
|
else
|
|
|
|
set_state(PART:"check", "default", 0.0);
|
2011-08-02 02:47:05 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2011-08-02 07:07:53 -07:00
|
|
|
}
|
2012-03-16 16:45:48 -07:00
|
|
|
|
|
|
|
group { name: "elm/check/base/toggle";
|
|
|
|
images {
|
|
|
|
image: "shelf_inset.png" COMP;
|
|
|
|
image: "bt_basew.png" COMP;
|
|
|
|
image: "bt_bases.png" COMP;
|
|
|
|
image: "bt_hilightw.png" COMP;
|
|
|
|
image: "tog_base_on.png" COMP;
|
|
|
|
image: "tog_base_off.png" COMP;
|
|
|
|
image: "tog_dis_base_on.png" COMP;
|
|
|
|
image: "tog_dis_base_off.png" COMP;
|
|
|
|
}
|
|
|
|
script {
|
|
|
|
public is_rtl;
|
2012-07-26 16:12:18 -07:00
|
|
|
public is_drag;
|
|
|
|
public was_drag;
|
2012-03-16 16:45:48 -07:00
|
|
|
}
|
|
|
|
parts {
|
|
|
|
part { name: "bg";
|
|
|
|
type: RECT;
|
|
|
|
mouse_events: 0;
|
|
|
|
scale: 1;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
rel1.relative: 1.0 0.0;
|
|
|
|
rel1.offset: -4 3;
|
|
|
|
rel2.offset: -4 -4;
|
|
|
|
align: 1.0 0.5;
|
|
|
|
min: 96 16;
|
|
|
|
max: 96 16;
|
|
|
|
aspect: 4.0 4.0;
|
|
|
|
aspect_preference: VERTICAL;
|
|
|
|
color: 255 255 255 255;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
part { name: "clipper";
|
|
|
|
type: RECT;
|
|
|
|
mouse_events: 0;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
rel1.to: "bg";
|
|
|
|
rel2.to: "bg";
|
|
|
|
color: 255 255 255 255;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
part { name: "button";
|
|
|
|
type: RECT;
|
|
|
|
scale: 1;
|
|
|
|
clip_to: "clipper";
|
|
|
|
mouse_events: 1;
|
|
|
|
dragable {
|
|
|
|
x: 1 1 0;
|
|
|
|
y: 0 0 0;
|
|
|
|
confine: "bg";
|
|
|
|
}
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
fixed: 1 1;
|
|
|
|
rel1.to: "bg";
|
|
|
|
rel2.to: "bg";
|
|
|
|
min: 16 16;
|
|
|
|
max: 16 16;
|
|
|
|
aspect: 1.0 1.0;
|
|
|
|
aspect_preference: VERTICAL;
|
|
|
|
color: 0 0 0 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
part { name: "button_events";
|
|
|
|
type: RECT;
|
|
|
|
dragable {
|
|
|
|
events: "button";
|
|
|
|
}
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
rel1.to_x: "bg";
|
|
|
|
rel1.offset: 0 0;
|
|
|
|
rel1.relative: 0.0 0.0;
|
|
|
|
rel2.to_x: "bg";
|
|
|
|
rel2.offset: -1 -1;
|
|
|
|
rel2.relative: 1.0 1.0;
|
|
|
|
color: 0 0 0 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
part { name: "onrect";
|
|
|
|
type: IMAGE;
|
|
|
|
scale: 1;
|
|
|
|
clip_to: "clipper";
|
|
|
|
mouse_events: 0;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
rel1.to: "button";
|
|
|
|
rel1.relative: -5.0 0.0;
|
|
|
|
rel2.to: "button";
|
|
|
|
rel2.relative: 0.5 1.0;
|
|
|
|
image.normal: "tog_base_on.png";
|
|
|
|
}
|
|
|
|
description { state: "disabled" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
image.normal: "tog_dis_base_on.png";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
part { name: "offrect";
|
|
|
|
type: IMAGE;
|
|
|
|
scale: 1;
|
|
|
|
clip_to: "clipper";
|
|
|
|
mouse_events: 0;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
rel1.to: "button";
|
|
|
|
rel1.relative: 0.5 0.0;
|
|
|
|
rel2.to: "button";
|
|
|
|
rel2.relative: 6.0 1.0;
|
|
|
|
image.normal: "tog_base_off.png";
|
|
|
|
}
|
|
|
|
description { state: "disabled" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
image.normal: "tog_dis_base_off.png";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
part { name: "elm.offtext";
|
|
|
|
type: TEXT;
|
|
|
|
mouse_events: 0;
|
|
|
|
scale: 1;
|
|
|
|
clip_to: "clipper";
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
fixed: 1 1;
|
|
|
|
rel1.to_x: "button";
|
|
|
|
rel1.relative: 1.0 0.0;
|
|
|
|
rel2.to_x: "offrect";
|
|
|
|
color: 0 0 0 255;
|
|
|
|
text {
|
|
|
|
font: "Sans,Edje-Vera";
|
|
|
|
size: 10;
|
|
|
|
min: 0 1;
|
|
|
|
align: 0.5 0.5;
|
|
|
|
text: "OFF";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
description { state: "disabled" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
color: 128 128 128 128;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
part { name: "elm.ontext";
|
|
|
|
type: TEXT;
|
|
|
|
effect: SOFT_SHADOW;
|
|
|
|
mouse_events: 0;
|
|
|
|
scale: 1;
|
|
|
|
clip_to: "clipper";
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
fixed: 1 1;
|
|
|
|
rel1.to_x: "onrect";
|
|
|
|
rel1.offset: 1 1;
|
|
|
|
rel2.to_x: "button";
|
|
|
|
rel2.offset: 0 0;
|
|
|
|
rel2.relative: 0.0 1.0;
|
|
|
|
color: 224 224 224 255;
|
|
|
|
color3: 0 0 0 64;
|
|
|
|
text {
|
|
|
|
font: "Sans,Edje-Vera";
|
|
|
|
size: 10;
|
|
|
|
min: 0 1;
|
|
|
|
align: 0.5 0.5;
|
|
|
|
text: "ON";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
description { state: "disabled" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
color: 128 128 128 128;
|
|
|
|
color3: 0 0 0 24;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
part { name: "conf_over";
|
|
|
|
mouse_events: 0;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
rel1.offset: -1 -1;
|
|
|
|
rel1.to: "bg";
|
|
|
|
rel2.offset: 0 0;
|
|
|
|
rel2.to: "bg";
|
|
|
|
image {
|
|
|
|
normal: "shelf_inset.png";
|
|
|
|
border: 7 7 7 7;
|
|
|
|
middle: 0;
|
|
|
|
}
|
|
|
|
fill.smooth : 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
part { name: "button0";
|
|
|
|
mouse_events: 0;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
rel1.to: "button2";
|
|
|
|
rel1.offset: -4 -4;
|
|
|
|
rel2.to: "button2";
|
|
|
|
rel2.offset: 3 3;
|
|
|
|
image {
|
|
|
|
normal: "bt_bases.png";
|
|
|
|
border: 11 11 11 11;
|
|
|
|
}
|
|
|
|
image.middle: SOLID;
|
|
|
|
color: 255 255 255 128;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
part { name: "button2";
|
|
|
|
mouse_events: 0;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
rel1.to: "button";
|
2012-07-25 15:02:29 -07:00
|
|
|
rel1.offset: -3 -3;
|
2012-03-16 16:45:48 -07:00
|
|
|
rel2.to: "button";
|
2012-07-25 15:02:29 -07:00
|
|
|
rel2.offset: 2 2;
|
2012-03-16 16:45:48 -07:00
|
|
|
image {
|
|
|
|
normal: "bt_basew.png";
|
|
|
|
border: 7 7 7 7;
|
|
|
|
}
|
|
|
|
image.middle: SOLID;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
part { name: "button3";
|
|
|
|
mouse_events: 0;
|
|
|
|
clip_to: "clipper";
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
rel1.to: "button2";
|
|
|
|
rel2.to: "button2";
|
|
|
|
rel2.relative: 1.0 0.5;
|
|
|
|
image {
|
|
|
|
normal: "bt_hilightw.png";
|
|
|
|
border: 4 4 4 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2012-05-02 18:19:05 -07:00
|
|
|
part { name: "elm.swallow.content";
|
2012-03-16 16:45:48 -07:00
|
|
|
type: SWALLOW;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
fixed: 1 0;
|
|
|
|
visible: 0;
|
|
|
|
align: 0.0 0.5;
|
|
|
|
rel1.offset: 4 4;
|
|
|
|
rel2.relative: 0.0 1.0;
|
|
|
|
rel2.offset: 3 -5;
|
|
|
|
}
|
|
|
|
description { state: "visible" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
visible: 1;
|
|
|
|
aspect: 1.0 1.0;
|
|
|
|
rel2.offset: 4 -5;
|
|
|
|
}
|
|
|
|
description { state: "disabled" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
color: 128 128 128 128;
|
|
|
|
}
|
|
|
|
description { state: "disabled_visible" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
color: 128 128 128 128;
|
|
|
|
visible: 1;
|
|
|
|
aspect: 1.0 1.0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
part { name: "elm.text";
|
|
|
|
type: TEXT;
|
|
|
|
mouse_events: 0;
|
|
|
|
scale: 1;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
visible: 0;
|
2012-05-02 18:19:05 -07:00
|
|
|
rel1.to_x: "elm.swallow.content";
|
2012-03-16 16:45:48 -07:00
|
|
|
rel1.relative: 1.0 0.0;
|
|
|
|
rel1.offset: 0 4;
|
|
|
|
rel2.to_x: "bg";
|
|
|
|
rel2.relative: 0.0 1.0;
|
2012-07-25 15:02:29 -07:00
|
|
|
rel2.offset: -7 -5;
|
2012-03-16 16:45:48 -07:00
|
|
|
color: 0 0 0 255;
|
|
|
|
text {
|
|
|
|
font: "Sans,Edje-Vera";
|
|
|
|
size: 10;
|
|
|
|
min: 0 0;
|
|
|
|
align: 0.0 0.5;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
description { state: "visible" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
visible: 1;
|
|
|
|
text.min: 1 1;
|
|
|
|
}
|
|
|
|
description { state: "disabled" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
color: 128 128 128 128;
|
|
|
|
}
|
|
|
|
description { state: "disabled_visible" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
color: 128 128 128 128;
|
|
|
|
visible: 1;
|
|
|
|
text.min: 1 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
part { name: "disabler";
|
|
|
|
type: RECT;
|
|
|
|
description { state: "default" 0.0;
|
|
|
|
color: 0 0 0 0;
|
|
|
|
visible: 0;
|
|
|
|
}
|
|
|
|
description { state: "disabled" 0.0;
|
|
|
|
inherit: "default" 0.0;
|
|
|
|
visible: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
programs {
|
2012-07-26 16:12:18 -07:00
|
|
|
program {
|
|
|
|
signal: "mouse,clicked,1";
|
|
|
|
source: "button";
|
|
|
|
script {
|
|
|
|
new Float:dx, Float:dy;
|
|
|
|
get_drag(PART:"button", dx, dy);
|
|
|
|
|
|
|
|
if (!get_int(was_drag)) {
|
|
|
|
if (dx > 0.5)
|
|
|
|
set_drag(PART:"button", 0.0, 0.0);
|
|
|
|
else
|
|
|
|
set_drag(PART:"button", 1.0, 0.0);
|
|
|
|
if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
|
|
|
|
(get_int(is_rtl) == 0) && (dx > 0.5))
|
|
|
|
emit("elm,action,check,off", "");
|
|
|
|
else
|
|
|
|
emit("elm,action,check,on", "");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
program {
|
|
|
|
signal: "drag";
|
|
|
|
source: "button";
|
|
|
|
script {
|
|
|
|
set_int(is_drag, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
program {
|
|
|
|
signal: "mouse,down,1";
|
|
|
|
source: "button";
|
|
|
|
script {
|
|
|
|
set_int(was_drag, 0);
|
|
|
|
set_int(is_drag, 0);
|
|
|
|
}
|
|
|
|
}
|
2012-03-16 16:45:48 -07:00
|
|
|
program { name: "drag_end";
|
|
|
|
signal: "mouse,up,1";
|
|
|
|
source: "button";
|
|
|
|
script {
|
|
|
|
new Float:dx, Float:dy;
|
|
|
|
get_drag(PART:"button", dx, dy);
|
|
|
|
if (dx > 0.5)
|
|
|
|
{
|
|
|
|
set_drag(PART:"button", 1.0, 0.0);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
set_drag(PART:"button", 0.0, 0.0);
|
|
|
|
}
|
|
|
|
if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
|
2012-07-26 16:12:18 -07:00
|
|
|
(get_int(is_rtl) == 0) && (dx > 0.5)) {
|
2012-03-16 16:45:48 -07:00
|
|
|
emit("elm,action,check,on", "");
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
emit("elm,action,check,off", "");
|
|
|
|
}
|
2012-07-26 16:12:18 -07:00
|
|
|
set_int(was_drag, get_int(is_drag));
|
|
|
|
set_int(is_drag, 0);
|
2012-03-16 16:45:48 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
program { name: "check_on";
|
|
|
|
signal: "elm,state,check,on";
|
|
|
|
source: "elm";
|
|
|
|
script {
|
|
|
|
new Float:drag;
|
|
|
|
if (get_int(is_rtl) == 0) {
|
|
|
|
drag = 100.0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
drag = 0.0;
|
|
|
|
}
|
|
|
|
set_drag(PART:"button", drag, 0.0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
program { name: "check_off";
|
|
|
|
signal: "elm,state,check,off";
|
|
|
|
source: "elm";
|
|
|
|
script {
|
|
|
|
new Float:drag;
|
|
|
|
if (get_int(is_rtl) == 0) {
|
|
|
|
drag = 0.0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
drag = 100.0;
|
|
|
|
}
|
|
|
|
set_drag(PART:"button", drag, 0.0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
program { name: "text_show";
|
|
|
|
signal: "elm,state,text,visible";
|
|
|
|
source: "elm";
|
|
|
|
action: STATE_SET "visible" 0.0;
|
|
|
|
target: "elm.text";
|
|
|
|
}
|
|
|
|
program { name: "text_hide";
|
|
|
|
signal: "elm,state,text,hidden";
|
|
|
|
source: "elm";
|
|
|
|
action: STATE_SET "default" 0.0;
|
|
|
|
target: "elm.text";
|
|
|
|
}
|
|
|
|
program { name: "icon_show";
|
|
|
|
signal: "elm,state,icon,visible";
|
|
|
|
source: "elm";
|
|
|
|
action: STATE_SET "visible" 0.0;
|
2012-05-02 18:19:05 -07:00
|
|
|
target: "elm.swallow.content";
|
2012-03-16 16:45:48 -07:00
|
|
|
}
|
|
|
|
program { name: "icon_hide";
|
|
|
|
signal: "elm,state,icon,hidden";
|
|
|
|
source: "elm";
|
|
|
|
action: STATE_SET "default" 0.0;
|
2012-05-02 18:19:05 -07:00
|
|
|
target: "elm.swallow.content";
|
2012-03-16 16:45:48 -07:00
|
|
|
}
|
|
|
|
program { name: "disable";
|
|
|
|
signal: "elm,state,disabled";
|
|
|
|
source: "elm";
|
|
|
|
action: STATE_SET "disabled" 0.0;
|
|
|
|
target: "elm.offtext";
|
|
|
|
target: "elm.ontext";
|
|
|
|
target: "onrect";
|
|
|
|
target: "offrect";
|
|
|
|
target: "disabler";
|
|
|
|
after: "disable_text";
|
|
|
|
}
|
|
|
|
program { name: "disable_text";
|
|
|
|
script {
|
|
|
|
new st[31];
|
|
|
|
new Float:vl;
|
|
|
|
get_state(PART:"elm.text", st, 30, vl);
|
|
|
|
if (!strcmp(st, "visible"))
|
|
|
|
set_state(PART:"elm.text", "disabled_visible", 0.0);
|
|
|
|
else
|
|
|
|
set_state(PART:"elm.text", "disabled", 0.0);
|
|
|
|
|
2012-05-02 18:19:05 -07:00
|
|
|
get_state(PART:"elm.swallow.content", st, 30, vl);
|
2012-03-16 16:45:48 -07:00
|
|
|
if (!strcmp(st, "visible"))
|
2012-05-02 18:19:05 -07:00
|
|
|
set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
|
2012-03-16 16:45:48 -07:00
|
|
|
else
|
2012-05-02 18:19:05 -07:00
|
|
|
set_state(PART:"elm.swallow.content", "disabled", 0.0);
|
2012-03-16 16:45:48 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
program { name: "enable";
|
|
|
|
signal: "elm,state,enabled";
|
|
|
|
source: "elm";
|
|
|
|
action: STATE_SET "default" 0.0;
|
|
|
|
target: "disabler";
|
|
|
|
target: "onrect";
|
|
|
|
target: "offrect";
|
|
|
|
after: "enable_text";
|
|
|
|
}
|
|
|
|
program { name: "enable_text";
|
|
|
|
script {
|
|
|
|
new st[31];
|
|
|
|
new Float:vl;
|
|
|
|
get_state(PART:"elm.text", st, 30, vl);
|
|
|
|
if (!strcmp(st, "disabled_visible"))
|
|
|
|
set_state(PART:"elm.text", "visible", 0.0);
|
|
|
|
else
|
|
|
|
set_state(PART:"elm.text", "default", 0.0);
|
|
|
|
|
2012-05-02 18:19:05 -07:00
|
|
|
get_state(PART:"elm.swallow.content", st, 30, vl);
|
2012-03-16 16:45:48 -07:00
|
|
|
if (!strcmp(st, "visible"))
|
2012-05-02 18:19:05 -07:00
|
|
|
set_state(PART:"elm.swallow.content", "visible", 0.0);
|
2012-03-16 16:45:48 -07:00
|
|
|
else
|
2012-05-02 18:19:05 -07:00
|
|
|
set_state(PART:"elm.swallow.content", "default", 0.0);
|
2012-03-16 16:45:48 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
program { name: "to_rtl";
|
|
|
|
signal: "edje,state,rtl";
|
|
|
|
source: "edje";
|
|
|
|
script {
|
|
|
|
set_int(is_rtl, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
program { name: "to_ltr";
|
|
|
|
signal: "edje,state,ltr";
|
|
|
|
source: "edje";
|
|
|
|
script {
|
|
|
|
set_int(is_rtl, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|