enlightenment/src/modules/conf2/e-module-conf2.edc

2193 lines
71 KiB
Plaintext

#define ASPECT_FILL(_ASPECT) \
aspect: _ASPECT _ASPECT; aspect_preference: NONE;
#define TILED_PATTERN(_WIDTH, _HEIGHT) \
fill { size { relative: 0.0 0.0; offset: _WIDTH _HEIGHT; } }
#define TILED_HORIZ(_WIDTH) \
fill { size { relative: 0.0 1.0; offset: _WIDTH 0; } }
#define FIXED_SIZE(_WIDTH, _HEIGHT) \
min: _WIDTH _HEIGHT; max: _WIDTH _HEIGHT; fixed: 1 1;
collections {
group {
name: "elm/conf2/option/overlay";
images.image: "vgrad_med_curved.png" COMP;
parts {
part { name: "base";
mouse_events: 0;
description { state: "default" 0.0;
image.normal: "vgrad_med_curved.png";
fill {
smooth: 0;
size {
relative: 0.0 1.0;
offset: 64 0;
}
}
}
description { state: "hide" 0.0;
inherit: "default";
visible: 0;
}
}
part {
name: "e.text.label";
type: TEXT;
mouse_events: 0;
scale: 1;
description { state: "default";
fixed: 0 1;
rel1.offset: 2 -30;
rel2.offset: -3 -15;
rel2.to_y: "e.swallow.content";
rel2.relative: 1 0;
color: 51 153 255 255;
color2: 51 153 255 24;
color3: 51 153 255 18;
text { font: "Sans"; size: 10;
min: 1 1;
ellipsis: 0.8;
align: 0.5 0.5;
text_class: "ilist_item";
}
}
}
part {
name: "e.swallow.content";
type: SWALLOW;
scale: 1;
description {
state: "default";
min: 170 170;
rel1.offset: 2 3;
rel2.offset: -3 -3;
}
}
part {
name: "e.text.value";
type: TEXT;
mouse_events: 0;
scale: 1;
description { state: "default";
fixed: 0 1;
rel1.relative: 0 1;
rel1.offset: 2 5;
rel2.offset: -3 25;
color: 51 153 255 255;
color2: 51 153 255 24;
color3: 51 153 255 18;
text { font: "Sans"; size: 10;
min: 1 1;
ellipsis: 0.8;
align: 0.5 0.5;
text_class: "ilist_item";
}
}
}
}
programs {
program {
signal: "e,state,bg_hide";
source: "e";
action: STATE_SET "hide" 0;
target: "base";
}
}
}
group {
name: "elm/conf2/tag/list";
parts {
part {
name: "e.swallow.options";
type: SWALLOW;
repeat_events: 1;
scale: 1;
clip_to: "clip";
description {
state: "default";
rel2.relative: 1 0;
minmul: 1 0;
}
description {
state: "show";
rel2.relative: 1 0.5;
}
}
part {
name: "e.swallow.tags";
type: SWALLOW;
repeat_events: 1;
scale: 1;
clip_to: "clip";
description {
state: "default";
rel1.to_y: "e.swallow.options";
rel1.relative: 0 1;
}
}
part {
name: "clip";
type: RECT;
scale: 1;
mouse_events: 0;
description {
state: "default";
rel1.to: "e.swallow.options";
rel2.to: "e.swallow.tags";
color: 255 255 255 255;
}
description {
state: "show";
color: 0 0 0 222;
}
}
part {
name: "clip_events";
type: RECT;
scale: 1;
mouse_events: 1;
description {
state: "default";
color: 0 0 0 0;
visible: 0;
}
description {
state: "show";
color: 0 0 0 0;
visible: 1;
}
}
part {
name: "e.swallow.discard";
type: SWALLOW;
scale: 1;
description {
state: "default";
fixed: 1 1;
max: 60 30;
rel1.to_y: "e.swallow.tags";
rel1.relative: 1 0;
rel1.offset: -180 30;
}
description {
state: "hidden";
inherit: "default";
rel1.to_x: "e.swallow.tags";
rel1.offset: 150 30;
}
}
part {
name: "e.swallow.apply";
type: SWALLOW;
scale: 1;
description {
state: "default";
fixed: 1 1;
max: 60 30;
rel1.to_y: "e.swallow.discard";
rel1.relative: 1 1;
rel1.offset: -180 20;
}
description {
state: "hidden";
inherit: "default";
rel1.to_x: "e.swallow.tags";
rel1.offset: 150 20;
}
}
part {
name: "e.swallow.overlay";
type: SWALLOW;
scale: 1;
description {
state: "default";
rel1.relative: 0.25 0.25;
rel2.relative: 0.75 0.75;
visible: 0;
}
description {
state: "show";
inherit: "default";
visible: 1;
}
}
}
programs {
program { name: "collapse";
signal: "e,action,collapse";
source: "e";
action: STATE_SET "default" 0.0;
target: "e.swallow.options";
transition: DECELERATE 0.3;
}
program { name: "expand";
signal: "e,action,expand";
source: "e";
action: STATE_SET "show" 0.0;
target: "e.swallow.options";
transition: DECELERATE 0.3;
}
program { name: "apply_show";
signal: "e,action,apply_show";
source: "e";
action: STATE_SET "default" 0.0;
target: "e.swallow.apply";
transition: DECELERATE 0.3;
}
program { name: "apply_hide";
signal: "e,action,apply_hide";
source: "e";
action: STATE_SET "hidden" 0.0;
target: "e.swallow.apply";
transition: DECELERATE 0.3;
}
program { name: "discard_show";
signal: "e,action,discard_show";
source: "e";
action: STATE_SET "default" 0.0;
target: "e.swallow.discard";
transition: DECELERATE 0.3;
}
program { name: "discard_hide";
signal: "e,action,discard_hide";
source: "e";
action: STATE_SET "hidden" 0.0;
target: "e.swallow.discard";
transition: DECELERATE 0.3;
}
program { name: "overlay_show";
signal: "e,action,overlay_show";
source: "e";
action: STATE_SET "show" 0.0;
target: "e.swallow.overlay";
target: "clip";
target: "clip_events";
transition: DECELERATE 0.3;
}
program { name: "overlay_hide";
signal: "e,action,overlay_hide";
source: "e";
action: STATE_SET "default" 0.0;
target: "e.swallow.overlay";
target: "clip";
target: "clip_events";
transition: DECELERATE 0.3;
}
program { name: "overlay_dismiss";
signal: "mouse,up,1";
source: "clip_events";
action: SIGNAL_EMIT "e,action,overlay_dismiss" "e";
}
}
}
group { name: "elm/label/base/conf2";
parts {
part { name: "elm.text"; type: TEXT;
effect: SHADOW BOTTOM;
scale: 1;
description { state: "default" 0.0;
rel1.offset: 2 2;
rel2.offset: -3 -3;
color: 255 255 255 255;
color3: 0 0 0 128;
color_class: "label_text";
text { font: "Sans"; size: 10;
min: 1 1;
align: 0.0 0.5;
text_class: "label";
}
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
color: 21 21 21 255;
color3: 255 255 255 25;
}
}
}
}
group { name: "elm/entry/base-single/conf2";
styles
{
style { name: "entry_textblock_style";
base: "font=Sans font_size=10 color=#ffffff wrap=none style=shadow,bottom shadow_color=#00000080 text_class=entry color_class=entry_text";
}
style { name: "entry_textblock_disabled_style";
base: "font=Sans font_size=10 color=#151515 wrap=none style=shadow,bottom shadow_color=#ffffff19 text_class=entry color_class=entry_text_disabled";
}
/* FIXME */
style { name: "entry_textblock_guide_style";
base: "font=Sans font_size=10 color=#00000080 wrap=none text_class=entry left_margin=2 right_margin=2 ellipsis=0.0";
tag: "em" "+ font_style=Oblique";
tag: "hilight" "+ font_weight=Bold";
}
}
parts {
part { name: "elm.guide";
type: TEXTBLOCK;
mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
rel1.to: "elm.text";
rel2.to: "elm.text";
text {
style: "entry_textblock_guide_style";
min: 0 1;
align: 0.0 0.0;
}
}
description { state: "hidden" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
part { name: "elm.text";
type: TEXTBLOCK;
mouse_events: 1;
scale: 1;
entry_mode: EDITABLE;
select_mode: DEFAULT;
cursor_mode: BEFORE;
multiline: 0;
source: "elm/entry/selection/conf2"; // selection under
// source2: "X"; // selection over
// source3: "X"; // cursor under
source4: "elm/entry/cursor/conf2"; // cursorover
//source5: "elm/entry/anchor/conf2"; // anchor under
// source6: "X"; // anchor over
description { state: "default" 0.0;
/* we gotta use 0 0 here, because of scrolled entries */
fixed: 0 0;
text {
style: "entry_textblock_style";
min: 1 1;
max: 0 0;
align: 0.0 0.5;
}
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
text {
style: "entry_textblock_disabled_style";
min: 0 1;
}
}
}
}
programs {
program { name: "focus";
signal: "load";
source: "";
action: FOCUS_SET;
target: "elm.text";
}
program { name: "disable";
signal: "elm,state,disabled";
source: "elm";
action: STATE_SET "disabled" 0.0;
target: "elm.text";
}
program { name: "enable";
signal: "elm,state,enabled";
source: "elm";
action: STATE_SET "default" 0.0;
target: "elm.text";
}
program { name: "gdisable";
signal: "elm,guide,disabled";
source: "elm";
action: STATE_SET "hidden" 0.0;
target: "elm.guide";
}
program { name: "genable";
signal: "elm,guide,enabled";
source: "elm";
action: STATE_SET "default" 0.0;
target: "elm.guide";
}
}
}
group { name: "elm/entry/cursor/conf2";
min: 1 0;
images.image: "white_bar_vert_glow.png" COMP;
parts {
part { name: "cursor"; mouse_events: 0;
description { state: "default" 0.0;
rel1.offset: -4 -4;
rel2.offset: 3 3;
image.normal: "white_bar_vert_glow.png";
image.border: 4 4 4 4;
fill.smooth: 0;
color: 255 255 255 0;
min: 9 10;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
color: 255 255 255 255;
}
}
}
programs {
program {
signal: "elm,action,focus"; source: "elm";
action: ACTION_STOP;
target: "cursor_show";
target: "cursor_hide";
target: "cursor_show_timer";
target: "cursor_hide_timer";
after: "cursor_show";
}
program {
name: "on_cursor_hide";
signal: "elm,action,unfocus"; source: "elm";
action: ACTION_STOP;
target: "cursor_show";
target: "cursor_hide";
target: "cursor_show_timer";
target: "cursor_hide_timer";
after: "cursor_hide_stop";
}
program {
name: "cursor_hide_stop";
action: STATE_SET "default" 0.0;
target: "cursor";
}
program { name: "cursor_show";
action: STATE_SET "visible" 0.0;
target: "cursor";
after: "cursor_show_timer";
}
program { name: "cursor_hide";
action: STATE_SET "default" 0.0;
target: "cursor";
transition: SINUSOIDAL 0.2;
after: "cursor_hide_timer";
}
program { name: "cursor_show_timer";
in: 0.5 0.0;
after: "cursor_hide";
}
program { name: "cursor_hide_timer";
in: 0.2 0.0;
after: "cursor_show";
}
}
}
group { name: "elm/entry/selection/conf2";
parts {
part { name: "selection"; type: RECT; mouse_events: 0;
description { state: "default" 0.0;
color: 51 153 255 255;
}
}
}
}
group { name: "elm/button/base/conf2";
images.image: "button_normal.png" COMP;
images.image: "button_clicked.png" COMP;
parts {
part { name: "base";
description { state: "default" 0.0;
image.normal: "button_normal.png";
image.border: 4 4 3 5;
image.middle: SOLID;
rel1.offset: -1 0;
rel2.offset: 0 1;
fill.smooth: 0;
}
description { state: "clicked" 0.0;
inherit: "default" 0.0;
image.normal: "button_clicked.png";
image.border: 5 5 4 6;
}
}
part { name: "icon_clip"; type: RECT;
description { state: "default" 0.0;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
color: 255 255 255 64;
}
}
part { name: "elm.swallow.content"; type: SWALLOW; mouse_events: 0;
clip_to: "icon_clip";
description { state: "default" 0.0;
min: 17 17;
align: 0.0 0.5;
fixed: 1 0;
rel1.offset: 6 5;
rel1.to: "base";
rel2.offset: 6 -8;
rel2.relative: 0 1;
rel2.to: "base";
}
description { state: "icon" 0.0;
inherit: "default" 0.0;
fixed: 0 0;
align: 0.5 0.5;
rel2.relative: 1.0 1.0;
rel2.offset: -7 -8;
}
}
part { name: "label_clip"; type: RECT;
description { state: "default" 0.0;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
part { name: "elm.text"; type: TEXT; mouse_events: 0;
effect: SHADOW BOTTOM;
scale: 1;
clip_to: "label_clip";
description { state: "default" 0.0;
rel1.offset: 2 5;
rel1.to_x: "elm.swallow.content";
rel1.relative: 1 0;
rel1.to_y: "base";
rel2.offset: -7 -9;
rel2.to: "base";
color: 255 255 255 255;
color3: 0 0 0 128;
color_class: "button_text";
text { font: "Sans"; size: 10;
min: 1 1;
align: 0.5 0.5;
text_class: "button";
}
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
color: 21 21 21 255;
color3: 255 255 255 25;
color_class: "button_text_disabled";
}
description { state: "icon" 0.0;
inherit: "default" 0.0;
visible: 0;
minmul: 0 1;
}
}
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: "button_text_disabled";
text { font: "Sans"; size: 10;
text_source: "elm.text";
align: 0.5 0.5;
min: 1 1;
text_class: "button";
}
visible: 0;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "event"; type: RECT;
ignore_flags: ON_HOLD;
description { state: "default" 0.0;
color: 0 0 0 0;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
}
programs {
program {
signal: "mouse,down,1"; source: "event";
action: SIGNAL_EMIT "elm,action,press" "";
after: "down_anim";
}
program {
name: "down_anim";
action: STATE_SET "clicked" 0.0;
target: "base";
}
program {
signal: "mouse,up,1"; source: "event";
action: SIGNAL_EMIT "elm,action,unpress" "";
after: "up_anim";
}
program {
name: "up_anim";
action: STATE_SET "default" 0.0;
target: "base";
}
program {
name: "button_pressed_anim";
signal: "elm,anim,activate";
source: "elm";
action: STATE_SET "clicked" 0.0;
target: "base";
}
program {
signal: "mouse,clicked,1*"; source: "event";
action: SIGNAL_EMIT "elm,action,click" "";
}
program {
signal: "elm,state,text,hidden"; source: "elm";
action: STATE_SET "icon" 0.0;
target: "elm.swallow.content";
target: "elm.text";
}
program {
signal: "elm,state,disabled"; source: "elm";
action: STATE_SET "disabled" 0.0;
target: "event";
target: "icon_clip";
target: "label_clip";
target: "label2";
transition: DECELERATE 0.3;
}
program {
signal: "elm,state,enabled"; source: "elm";
action: STATE_SET "default" 0.0;
target: "event";
target: "icon_clip";
target: "label_clip";
target: "label2";
transition: DECELERATE 0.3;
}
}
}
group { name: "elm/radio/base/conf2";
images.image: "inset_shadow_circle_tiny.png" COMP;
images.image: "inset_circle_tiny.png" COMP;
images.image: "sym_radio_alum.png" COMP;
parts {
part { name: "inset"; mouse_events: 0;
description { state: "default" 0.0;
rel1.offset: 2 2;
rel2.relative: 0.0 1.0;
rel2.offset: 2 -3;
image.normal: "inset_shadow_circle_tiny.png";
align: 0.0 0.5;
min: 13 13;
max: 13 13;
fixed: 1 1;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
image.normal: "inset_circle_tiny.png";
}
}
part { name: "clip"; type: RECT;
description { state: "default" 0.0;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
color: 255 255 255 64;
}
}
part { name: "indicator"; mouse_events: 0;
clip_to: "clip";
description { state: "default" 0.0;
rel1.to: "inset";
rel2.to: "inset";
image.normal: "sym_radio_alum.png";
min: 11 11;
max: 11 11;
visible: 0;
}
description { state: "selected" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "elm.text"; type: TEXT;
effect: SHADOW BOTTOM;
scale: 1;
description { state: "default" 0.0;
rel1.offset: 2 2;
rel1.to_x: "inset";
rel1.relative: 1.0 0.0;
rel2.offset: -3 -3;
color: 255 255 255 255;
color3: 0 0 0 128;
color_class: "radio_text";
text { font: "Sans"; size: 10;
min: 1 1;
align: 0.0 0.5;
text_class: "radio_button";
}
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
color: 21 21 21 255;
color3: 255 255 255 25;
}
}
part { name: "event"; type: RECT;
ignore_flags: ON_HOLD;
description { state: "default" 0.0;
color: 0 0 0 0;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
}
programs {
program { name: "click";
signal: "mouse,up,1";
source: "event";
action: SIGNAL_EMIT "elm,action,radio,toggle" "";
}
program { name: "radio_on";
signal: "elm,state,radio,on";
source: "elm";
action: STATE_SET "selected" 0.0;
target: "indicator";
}
program { name: "radio_off";
signal: "elm,state,radio,off";
source: "elm";
action: STATE_SET "default" 0.0;
target: "indicator";
}
program { name: "disable";
signal: "elm,state,disabled";
source: "elm";
action: STATE_SET "disabled" 0.0;
target: "inset";
target: "clip";
target: "elm.text";
target: "event";
}
program { name: "enable";
signal: "elm,state,enabled";
source: "elm";
action: STATE_SET "default" 0.0;
target: "inset";
target: "clip";
target: "elm.text";
target: "event";
}
}
}
group { name: "elm/bg/base/conf2";
images.image: "vgrad_med_curved.png" COMP;
parts {
part { name: "base";
mouse_events: 0;
description { state: "default" 0.0;
image.normal: "vgrad_med_curved.png";
fill {
smooth: 0;
size {
relative: 0.0 1.0;
offset: 64 0;
}
}
}
}
part { name: "elm.swallow.rectangle";
type: SWALLOW;
description { state: "default" 0.0;
}
}
part { name: "elm.swallow.background";
type: SWALLOW;
description { state: "default" 0.0;
}
}
part { name: "elm.swallow.content";
type: SWALLOW;
description { state: "default" 0.0;
}
}
}
}
group { name: "elm/genlist/item/conf2_tag/default";
alias: "elm/genlist/item_compress/conf2_tag/default";
data.item: "stacking" "above";
data.item: "selectraise" "on";
data.item: "texts" "elm.text";
data.item: "contents" "elm.swallow.icon elm.swallow.end";
data.item: "treesize" "20";
images.image: "bevel_curved_horiz_out.png" COMP;
images.image: "shadow_rounded_horiz.png" COMP;
images.image: "vgrad_med_dark.png" COMP;
images.image: "bevel_horiz_out.png" COMP;
images.image: "shine.png" COMP;
parts {
part { name: "base"; type: RECT; mouse_events: 0;
description { state: "default" 0.0;
color: 64 64 64 255;
color_class: "ilist_item_base";
}
}
part { name: "bevel"; mouse_events: 0;
description { state: "default" 0.0;
image.normal: "bevel_curved_horiz_out.png";
image.border: 0 0 2 2;
image.middle: 0;
fill.smooth: 0;
}
}
part { name: "sel_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: "selected" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "sel_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: "selected" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "sel_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;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "elm.swallow.pad";
type: SWALLOW;
description { state: "default" 0.0;
fixed: 1 0;
align: 0.0 0.5;
rel1 {
relative: 0.0 0.0;
offset: 4 4;
}
rel2 {
relative: 0.0 1.0;
offset: 4 -5;
}
}
}
part { name: "elm.swallow.icon"; type: SWALLOW;
description { state: "default" 0.0;
align: 0.0 0.5;
aspect: 1.0 1.0; aspect_preference: VERTICAL;
rel1.offset: 2 2;
rel2.relative: 0.0 1.0;
rel2.offset: 2 -3;
}
}
part { name: "elm.text"; type: TEXT; mouse_events: 0;
effect: SHADOW BOTTOM;
scale: 1;
description { state: "default" 0.0;
rel1.offset: 2 3;
rel1.relative: 1.0 0.0;
rel1.to_x: "elm.swallow.icon";
rel2.offset: -3 -3;
rel2.relative: 0.0 1.0;
rel2.to_x: "elm.swallow.end";
color: 255 255 255 255;
color3: 0 0 0 128;
color_class: "ilist_item";
text { font: "Sans"; size: 10;
min: 1 1;
ellipsis: 0.8;
align: 0.0 0.5;
text_class: "ilist_item";
}
}
description { state: "selected" 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: "ilist_item_disabled";
text { font: "Sans"; size: 10;
text_source: "elm.text";
align: 0.0 0.5;
text_class: "ilist_item";
}
visible: 0;
}
description { state: "selected" 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: "ilist_item_selected";
text { font: "Sans"; size: 10;
text_source: "elm.text";
align: 0.0 0.5;
text_class: "ilist_item";
}
visible: 0;
}
description { state: "selected" 0.0;
inherit: "default" 0.0;
visible: 1;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
part { name: "elm.swallow.end"; type: SWALLOW;
description { state: "default" 0.0;
align: 1.0 0.5;
aspect: 1.0 1.0; aspect_preference: VERTICAL;
rel1.offset: -3 2;
rel1.relative: 1.0 0.0;
rel2.offset: -3 -3;
}
}
part { name: "sel_shine"; mouse_events: 0;
description { state: "default" 0.0;
image.normal: "shine.png";
rel1.offset: 0 -2;
rel1.to: "sel_base";
rel2.relative: 1.0 0.0;
rel2.offset: -1 2;
rel2.to: "sel_base";
FIXED_SIZE(69, 5)
visible: 0;
}
description { state: "selected" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "event"; type: RECT;
repeat_events: 1;
description { state: "default" 0.0;
color: 0 0 0 0;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
}
programs {
program {
signal: "elm,state,selected"; source: "elm";
action: STATE_SET "selected" 0.0;
target: "sel_shadow";
target: "sel_base";
target: "sel_bevel";
target: "sel_shine";
target: "elm.text";
target: "label2";
target: "label3";
}
program {
signal: "elm,state,unselected"; source: "elm";
action: STATE_SET "default" 0.0;
target: "sel_shadow";
target: "sel_base";
target: "sel_bevel";
target: "sel_shine";
target: "elm.text";
target: "label2";
target: "label3";
}
program {
signal: "elm,state,disabled"; source: "elm";
action: STATE_SET "disabled" 0.0;
target: "event";
target: "elm.text";
target: "label2";
target: "label3";
}
program {
signal: "elm,state,enabled"; source: "elm";
action: STATE_SET "default" 0.0;
target: "event";
target: "elm.text";
target: "label2";
target: "label3";
}
}
}
group { name: "elm/genlist/item/conf2_double_label/default";
alias: "elm/genlist/item_compress/conf2_double_label/default";
data.item: "stacking" "above";
data.item: "selectraise" "on";
data.item: "texts" "elm.text elm.text.sub";
data.item: "contents" "elm.swallow.icon elm.swallow.end";
data.item: "treesize" "20";
images.image: "bevel_curved_horiz_out.png" COMP;
images.image: "shadow_rounded_horiz.png" COMP;
images.image: "vgrad_med_dark.png" COMP;
images.image: "bevel_horiz_out.png" COMP;
images.image: "shine.png" COMP;
parts {
part { name: "base"; type: RECT; mouse_events: 0;
description { state: "default" 0.0;
color: 64 64 64 255;
color_class: "ilist_item_base";
}
}
part { name: "bevel"; mouse_events: 0;
description { state: "default" 0.0;
image.normal: "bevel_curved_horiz_out.png";
image.border: 0 0 2 2;
image.middle: 0;
fill.smooth: 0;
}
}
part { name: "sel_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: "selected" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "sel_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: "selected" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "sel_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;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "elm.swallow.pad";
type: SWALLOW;
description { state: "default" 0.0;
fixed: 1 0;
align: 0.0 0.5;
rel1 {
relative: 0.0 0.0;
offset: 4 4;
}
rel2 {
relative: 0.0 1.0;
offset: 4 -5;
}
}
}
part { name: "elm.swallow.icon"; type: SWALLOW;
description { state: "default" 0.0;
align: 0.0 0.5;
aspect: 1.0 1.0; aspect_preference: VERTICAL;
rel1.offset: 2 2;
rel2.relative: 0.0 1.0;
rel2.offset: 2 -3;
}
}
part { name: "elm.text"; type: TEXT; mouse_events: 0;
effect: SHADOW BOTTOM;
scale: 1;
description { state: "default" 0.0;
rel1.offset: 2 3;
rel1.relative: 1.0 0.0;
rel1.to_x: "elm.swallow.icon";
rel2.offset: -3 -3;
rel2.relative: 0.0 1.0;
rel2.to_x: "elm.swallow.end";
color: 255 255 255 255;
color3: 0 0 0 128;
color_class: "ilist_item";
text { font: "Sans"; size: 10;
min: 1 1;
ellipsis: 0.8;
align: 0.0 0.5;
text_class: "ilist_item";
}
}
description { state: "selected" 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: "ilist_item_disabled";
text { font: "Sans"; size: 10;
text_source: "elm.text";
align: 0.0 0.5;
text_class: "ilist_item";
}
visible: 0;
}
description { state: "selected" 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: "ilist_item_selected";
text { font: "Sans"; size: 10;
text_source: "elm.text";
align: 0.0 0.5;
text_class: "ilist_item";
}
visible: 0;
}
description { state: "selected" 0.0;
inherit: "default" 0.0;
visible: 1;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
part { name: "elm.text.sub"; type: TEXT; mouse_events: 0;
scale: 1;
description {
state: "default" 0.0;
rel1.offset: 2 3;
rel1.relative: 1.0 0.5;
rel1.to_x: "elm.swallow.icon";
rel2.offset: -3 -3;
rel2.relative: 0.0 1.0;
rel2.to_x: "elm.swallow.end";
color: 255 255 255 255;
color3: 0 0 0 128;
text {
font: "Sans";
size: 8;
min: 1 1;
align: 0.0 0.5;
text_class: "list_item";
}
}
description { state: "selected" 0.0;
inherit: "default" 0.0;
color: 51 153 255 255;
color2: 51 153 255 24;
color3: 51 153 255 18;
}
}
part { name: "elm.swallow.end"; type: SWALLOW;
description { state: "default" 0.0;
align: 1.0 0.5;
aspect: 1.0 1.0; aspect_preference: VERTICAL;
rel1.offset: -3 2;
rel1.relative: 1.0 0.0;
rel2.offset: -3 -3;
}
}
part { name: "sel_shine"; mouse_events: 0;
description { state: "default" 0.0;
image.normal: "shine.png";
rel1.offset: 0 -2;
rel1.to: "sel_base";
rel2.relative: 1.0 0.0;
rel2.offset: -1 2;
rel2.to: "sel_base";
FIXED_SIZE(69, 5)
visible: 0;
}
description { state: "selected" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "event"; type: RECT;
repeat_events: 1;
description { state: "default" 0.0;
color: 0 0 0 0;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
}
programs {
program {
signal: "elm,state,selected"; source: "elm";
action: STATE_SET "selected" 0.0;
target: "sel_shadow";
target: "sel_base";
target: "sel_bevel";
target: "sel_shine";
target: "elm.text";
target: "elm.text.sub";
target: "label2";
target: "label3";
}
program {
signal: "elm,state,unselected"; source: "elm";
action: STATE_SET "default" 0.0;
target: "sel_shadow";
target: "sel_base";
target: "sel_bevel";
target: "sel_shine";
target: "elm.text";
target: "elm.text.sub";
target: "label2";
target: "label3";
}
program {
signal: "elm,state,disabled"; source: "elm";
action: STATE_SET "disabled" 0.0;
target: "event";
target: "elm.text";
target: "label2";
target: "label3";
}
program {
signal: "elm,state,enabled"; source: "elm";
action: STATE_SET "default" 0.0;
target: "event";
target: "elm.text";
target: "label2";
target: "label3";
}
}
}
group { name: "elm/genlist/item/conf2_thumb/default";
data.item: "stacking" "above";
data.item: "selectraise" "on";
data.item: "texts" "elm.text";
data.item: "contents" "elm.swallow.icon";
data.item: "treesize" "20";
images.image: "bevel_curved_horiz_out.png" COMP;
images.image: "shadow_rounded_horiz.png" COMP;
images.image: "vgrad_med_dark.png" COMP;
images.image: "bevel_horiz_out.png" COMP;
images.image: "shine.png" COMP;
parts {
part { name: "base"; type: RECT; mouse_events: 0;
description { state: "default" 0.0;
color: 64 64 64 255;
color_class: "ilist_item_base";
}
}
part { name: "bevel"; mouse_events: 0;
description { state: "default" 0.0;
image.normal: "bevel_curved_horiz_out.png";
image.border: 0 0 2 2;
image.middle: 0;
fill.smooth: 0;
}
}
part { name: "sel_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: "selected" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "sel_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: "selected" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "sel_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;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "elm.swallow.icon"; type: SWALLOW; mouse_events: 0;
description { state: "default" 0.0;
min: 150 150;
max: 170 150;
align: 0.5 0.0;
aspect: 1.0 1.0; aspect_preference: VERTICAL;
rel1.offset: 2 2;
rel2.offset: 2 -3;
}
}
part { name: "elm.text"; type: TEXT; mouse_events: 0;
effect: SHADOW BOTTOM;
scale: 1;
description { state: "default" 0.0;
rel1.offset: 2 3;
rel1.relative: 0.0 1.0;
rel1.to_y: "elm.swallow.icon";
rel2.offset: -3 -3;
color: 255 255 255 255;
color3: 0 0 0 128;
color_class: "ilist_item";
text { font: "Sans"; size: 10;
min: 1 1;
ellipsis: 0.8;
align: 0.5 0.5;
text_class: "ilist_item";
}
}
description { state: "selected" 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: "ilist_item_disabled";
text { font: "Sans"; size: 10;
text_source: "elm.text";
align: 0.5 0.5;
text_class: "ilist_item";
}
visible: 0;
}
description { state: "selected" 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: "ilist_item_selected";
text { font: "Sans"; size: 10;
text_source: "elm.text";
align: 0.5 0.5;
text_class: "ilist_item";
}
visible: 0;
}
description { state: "selected" 0.0;
inherit: "default" 0.0;
visible: 1;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
part { name: "sel_shine"; mouse_events: 0;
description { state: "default" 0.0;
image.normal: "shine.png";
rel1.offset: 0 -2;
rel1.to: "sel_base";
rel2.relative: 1.0 0.0;
rel2.offset: -1 2;
rel2.to: "sel_base";
FIXED_SIZE(69, 5)
visible: 0;
}
description { state: "selected" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "event"; type: RECT;
description { state: "default" 0.0;
color: 0 0 0 0;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
}
programs {
program {
signal: "elm,state,selected"; source: "elm";
action: STATE_SET "selected" 0.0;
target: "sel_shadow";
target: "sel_base";
target: "sel_bevel";
target: "sel_shine";
target: "elm.text";
target: "label2";
target: "label3";
}
program {
signal: "elm,state,unselected"; source: "elm";
action: STATE_SET "default" 0.0;
target: "sel_shadow";
target: "sel_base";
target: "sel_bevel";
target: "sel_shine";
target: "elm.text";
target: "label2";
target: "label3";
}
program {
signal: "elm,state,disabled"; source: "elm";
action: STATE_SET "disabled" 0.0;
target: "event";
target: "elm.text";
target: "label2";
target: "label3";
}
program {
signal: "elm,state,enabled"; source: "elm";
action: STATE_SET "default" 0.0;
target: "event";
target: "elm.text";
target: "label2";
target: "label3";
}
}
}
group { name: "elm/check/base/conf2";
images.image: "inset_shadow_tiny.png" COMP;
images.image: "bevel_in.png" COMP;
images.image: "sym_check_alum.png" COMP;
parts {
part { name: "base"; type: RECT;
description { state: "default" 0.0;
rel1.offset: 1 1;
rel1.to: "inset";
rel2.offset: -2 -2;
rel2.to: "inset";
color: 24 24 24 255;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
color: 64 64 64 255;
}
}
part { name: "shadow"; mouse_events: 0;
description { state: "default" 0.0;
image.normal: "inset_shadow_tiny.png";
rel1.to: "base";
rel2.to: "base";
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
part { name: "inset"; mouse_events: 0;
description { state: "default" 0.0;
rel1.offset: 1 2;
rel2.offset: 1 -3;
image.normal: "bevel_in.png";
image.border: 1 1 1 1;
image.middle: 0;
fill.smooth: 0;
min: 18 18;
max: 18 18;
fixed: 1 1;
}
}
part { name: "clip"; type: RECT;
description { state: "default" 0.0;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
color: 255 255 255 64;
}
}
part { name: "check"; mouse_events: 0;
clip_to: "clip";
description { state: "default" 0.0;
rel1.to: "base";
rel2.to: "base";
image.normal: "sym_check_alum.png";
min: 16 16;
max: 16 16;
visible: 0;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "event"; type: RECT;
ignore_flags: ON_HOLD;
description { state: "default" 0.0;
color: 0 0 0 0;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
}
programs {
program { name: "click";
signal: "mouse,clicked,1";
source: "event";
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 {
signal: "elm,state,disabled"; source: "e";
action: STATE_SET "disabled" 0.0;
target: "base";
target: "shadow";
target: "clip";
target: "event";
}
program {
signal: "e,state,enabled"; source: "e";
action: STATE_SET "default" 0.0;
target: "base";
target: "shadow";
target: "clip";
target: "event";
}
}
}
group { name: "elm/tooltip/base/conf2";
min: 30 30;
data {
item: "pad_x" "20";
item: "pad_y" "20";
item: "pad_border_x" "10";
item: "pad_border_y" "10";
item: "hide_timeout" "0.3";
}
images.image: "vgrad_med_curved.png" COMP;
parts {
part { name: "pop";
mouse_events: 0;
description { state: "default" 0.0;
min: 30 30;
rel1 {
to: "elm.swallow.content";
offset: -15 -15;
}
rel2 {
to: "elm.swallow.content";
offset: 14 14;
}
image {
normal: "vgrad_med_curved.png";
border: 14 14 14 14;
}
image.middle: SOLID;
}
}
part { name: "elm.swallow.content";
type: SWALLOW;
description { state: "default" 0.0; }
}
}
}
///////////////////////////////////////////////////////////////////////////////
/*
Round volume knob.
2012 - Raoul Hecky <raoul.hecky@gmail.com>
It's a new custom style for an elm_slider.
It uses embryo and hidden dragable part to set/get the position
of the volume knob. Another hidden dragable is used to move the
knob using the mouse/finger. All math are done using embryo.
*/
group
{
name: "base/knob_volume";
images
{
image: "volume_knob.png" COMP;
image: "volume_knob_move.png" COMP;
image: "volume_knob_ledsoff.png" COMP;
image: "volume_led_01.png" COMP;
}
script
{
#define VOLUME_MIN_ANGLE 0.0
#define VOLUME_MAX_ANGLE 264.0
#define VOLUME_MAX_LEDS 45
public knob_angle;
public knob_offset;
public leds_on;
public led_status; //edje list to keep track of each led status
public Float:calc_angle(mx, my)
{
new px, py, pw, ph;
get_geometry(PART:"bg", px, py, pw, ph);
new center_x, center_y;
center_x = px + pw / 2;
center_y = py + ph / 2;
new dx, dy;
dx = center_x - mx;
dy = center_y - my;
new Float:angle;
angle = atan2(-dx, dy) * 180.0 / PI + 180.0;
return angle;
}
public rotate_knob(Float:val)
{
custom_state(PART:"knob", "default", 0.0);
set_state_val(PART:"knob", STATE_MAP_ROT_Z, val);
set_state(PART:"knob", "custom", 0.0);
//set needed leds on or off from current value
set_int(leds_on, round(val * VOLUME_MAX_LEDS / VOLUME_MAX_ANGLE));
emit("leds,changed", "volume");
}
}
parts
{
part
{
name: "bg";
type: RECT;
scale: 1;
description
{
state: "default" 0.0;
visible: 0;
rel1.to: "leds_off";
rel2.to: "leds_off";
}
}
part
{
name: "knob_back";
mouse_events: 0;
scale: 1;
description
{
state: "default" 0.0;
image.normal: "volume_knob.png";
}
}
part
{
name: "knob";
mouse_events: 0;
scale: 1;
description
{
state: "default" 0.0;
image.normal: "volume_knob_move.png";
map.on: 1;
}
}
part
{
name: "leds_off";
mouse_events: 0;
scale: 1;
description
{
state: "default" 0.0;
image.normal: "volume_knob_ledsoff.png";
color: 255 255 255 50;
}
}
#define VOLUME_LED_ON(num, inum) \
part \
{ \
name: "led_"num; \
mouse_events: 0; \
scale: 1; \
description \
{ \
state: "default" 0.0; \
rel1.to: "leds_off"; \
rel2.to: "leds_off"; \
image.normal: "volume_led_01.png"; \
map { \
on: 1; \
rotation { \
center: "bg"; \
z: (((inum-1)*VOLUME_MAX_ANGLE)/45); \
} \
} \
visible: 0; \
color: 255 255 255 0; \
} \
description \
{ \
state: "visible" 0.0; \
inherit: "default" 0.0; \
visible: 1; \
color: 255 255 255 255; \
} \
} \
program \
{ \
name: "show_led_"num; \
action: STATE_SET "visible" 0.0; \
transition: DECELERATE 0.6 CURRENT; \
target: "led_"num; \
} \
program \
{ \
name: "hide_led_"num; \
action: STATE_SET "default" 0.0; \
transition: DECELERATE 0.6 CURRENT; \
target: "led_"num; \
} \
program \
{ \
name: "sig_led_changed_"num; \
signal: "leds,changed"; \
source: "volume"; \
script \
{ \
new current_status = fetch_int(led_status, inum - 1); \
new new_status; \
if (get_int(leds_on) >= inum) \
new_status = 1; \
else \
new_status = 0; \
\
if (current_status != new_status) \
{ \
if (new_status == 1) \
run_program(PROGRAM:"show_led_"num); \
else if (new_status == 0) \
run_program(PROGRAM:"hide_led_"num); \
\
replace_int(led_status, inum - 1, new_status); \
} \
} \
}
VOLUME_LED_ON("01", 1)
VOLUME_LED_ON("02", 2)
VOLUME_LED_ON("03", 3)
VOLUME_LED_ON("04", 4)
VOLUME_LED_ON("05", 5)
VOLUME_LED_ON("06", 6)
VOLUME_LED_ON("07", 7)
VOLUME_LED_ON("08", 8)
VOLUME_LED_ON("09", 9)
VOLUME_LED_ON("10", 10)
VOLUME_LED_ON("11", 11)
VOLUME_LED_ON("12", 12)
VOLUME_LED_ON("13", 13)
VOLUME_LED_ON("14", 14)
VOLUME_LED_ON("15", 15)
VOLUME_LED_ON("16", 16)
VOLUME_LED_ON("17", 17)
VOLUME_LED_ON("18", 18)
VOLUME_LED_ON("19", 19)
VOLUME_LED_ON("20", 20)
VOLUME_LED_ON("21", 21)
VOLUME_LED_ON("22", 22)
VOLUME_LED_ON("23", 23)
VOLUME_LED_ON("24", 24)
VOLUME_LED_ON("25", 25)
VOLUME_LED_ON("26", 26)
VOLUME_LED_ON("27", 27)
VOLUME_LED_ON("28", 28)
VOLUME_LED_ON("29", 29)
VOLUME_LED_ON("30", 30)
VOLUME_LED_ON("31", 31)
VOLUME_LED_ON("32", 32)
VOLUME_LED_ON("33", 33)
VOLUME_LED_ON("34", 34)
VOLUME_LED_ON("35", 35)
VOLUME_LED_ON("36", 36)
VOLUME_LED_ON("37", 37)
VOLUME_LED_ON("38", 38)
VOLUME_LED_ON("39", 39)
VOLUME_LED_ON("40", 40)
VOLUME_LED_ON("41", 41)
VOLUME_LED_ON("42", 42)
VOLUME_LED_ON("43", 43)
VOLUME_LED_ON("44", 44)
VOLUME_LED_ON("45", 45)
part
{
name: "event";
type: RECT;
description
{
state: "default" 0.0;
rel1.to: "knob";
rel2.to: "knob";
color: 0 0 0 0;
}
dragable
{
x: 1 1 0;
y: 1 1 0;
}
}
part
{
//The real slider for elm_slider
name: "elm.dragable.slider";
type: RECT;
description
{
state: "default" 0.0;
visible: 0;
}
dragable
{
x: 1 1 0;
y: 0 0 0;
}
}
}
programs
{
program
{
name: "on_drag_start";
signal: "drag,start";
source: "event";
script
{
new mx, my;
get_mouse(mx, my);
set_float(knob_offset, calc_angle(mx, my) - get_float(knob_angle));
}
}
program
{
name: "on_drag_move";
signal: "drag";
source: "event";
script
{
new mx, my;
get_mouse(mx, my);
new Float:angle = calc_angle(mx, my) - get_float(knob_offset);
//Limits the button range
if (angle < VOLUME_MIN_ANGLE) angle = VOLUME_MIN_ANGLE;
if (angle > VOLUME_MAX_ANGLE) angle = VOLUME_MAX_ANGLE;
set_float(knob_angle, angle);
rotate_knob(angle);
set_drag(PART:"elm.dragable.slider",
get_float(knob_angle) / VOLUME_MAX_ANGLE, 0.0);
}
}
program
{
name: "on_drag_stop";
signal: "drag,stop";
source: "event";
script
{
set_drag(PART:"event", 0.0, 0.0);
}
}
program
{
name: "on_slider_set";
signal: "drag,set";
source: "elm.dragable.slider";
script
{
new Float:dx, Float:dy;
get_drag(PART:"elm.dragable.slider", dx, dy);
new Float:angle = dx * VOLUME_MAX_ANGLE;
set_float(knob_angle, angle);
rotate_knob(angle);
}
}
program
{
name: "on_init";
signal: "show";
script
{
while (count(led_status) < VOLUME_MAX_LEDS)
append_int(led_status, 0);
}
}
program
{
name: "on_wheel";
signal: "mouse,wheel*";
source: "event";
after: "on_slider_set";
}
}
}
group
{
name: "elm/slider/horizontal/knob_volume";
inherit: "base/knob_volume";
parts
{
part
{
name: "knob_back";
description
{
state: "default" 0.0;
rel1.to: "knob";
rel2.to: "knob";
aspect: 1.0 1.0;
aspect_preference: VERTICAL;
}
}
part
{
name: "knob";
description
{
state: "default" 0.0;
min: 24 24;
aspect: 1.0 1.0;
aspect_preference: VERTICAL;
rel1.offset: 1 1;
rel2.relative: 0.0 1.0;
rel2.offset: 1 -2;
align: 0.0 0.5;
}
}
part
{
name: "leds_off";
description
{
state: "default" 0.0;
rel1.to: "knob";
rel2.to: "knob";
aspect: 1.0 1.0;
aspect_preference: VERTICAL;
}
}
}
}
/* aaaaaaaaaand because the volume knob doesn't resize we need another group here */
group
{
name: "elm/slider/horizontal/knob_volume_big";
inherit: "base/knob_volume";
min: 200 200;
parts
{
part
{
name: "knob_back";
description
{
state: "default" 0.0;
rel1 { relative: 0.5 0.5; offset: -100 -100; }
rel2 { relative: 0.5 0.5; offset: 99 99; }
}
}
part
{
name: "knob";
description
{
state: "default" 0.0;
rel1 { relative: 0.5 0.5; offset: -100 -100; }
rel2 { relative: 0.5 0.5; offset: 99 99; }
}
}
part
{
name: "leds_off";
description
{
state: "default" 0.0;
rel1 { relative: 0.5 0.5; offset: -100 -100; }
rel2 { relative: 0.5 0.5; offset: 99 99; }
}
}
}
}
}