efl/data/elementary/themes/edc/music_control.edc

223 lines
6.5 KiB
Plaintext

group { name: "e/modules/music-control/icon";
alias: "modules/music-control/icon";
max: 160 160;
set { name: "efm_drive_cd_icon";
image { image: "efm_drive_cd_160.png" COMP; size: 81 81 16000 16000; }
image { image: "efm_drive_cd_080.png" COMP; size: 41 41 80 80; }
image { image: "efm_drive_cd_040.png" COMP; size: 0 0 40 40; }
}
parts {
part { name: "image"; mouse_events: 0;
description { state: "default" 0.0;
aspect: 1.0 1.0; aspect_preference: BOTH;
image.normal: "efm_drive_cd_icon";
}
}
}
}
group { name: "e/modules/music-control/main";
alias: "modules/music-control/main";
set { name: "efm_drive_cd_icon";
image { image: "efm_drive_cd_160.png" COMP; size: 81 81 16000 16000; }
image { image: "efm_drive_cd_080.png" COMP; size: 41 41 80 80; }
image { image: "efm_drive_cd_040.png" COMP; size: 0 0 40 40; }
}
parts {
part { name: "icon";
description { state: "default" 0.0;
aspect: 1.0 1.0; aspect_preference: BOTH;
image.normal: "efm_drive_cd_icon";
}
}
}
}
group { name: "e/modules/music-control/popup";
alias: "modules/music-control/popup";
#ifdef SKIP_NAMESPACE_VALIDATION
skip_namespace_validation: 1;
#endif
min: 160 160;
images.image: "icon_prev_mono.png" COMP;
images.image: "icon_next_mono.png" COMP;
images.image: "icon_pause_mono.png" COMP;
images.image: "icon_play_mono.png" COMP;
styles {
style { name: "music_control_metadata_style";
base: "font="FN" font_size=10 align=left text_class=tb_plain color=#eee";
tag: "title" "+ font_size=10 font="FNBD" text_class=tb_big color=#fff";
tag: "tag" "+ font_size=8 color=#33399ff";
tag: "br" "\n";
}
}
script {
public message(Msg_Type:type, id, ...) {
new txt[128];
getsarg(2, txt, 128);
set_text(PART:"player_name", txt);
}
}
parts {
alias: "cover_swallow" "e.cover_swallow";
part { name: "cover_bg";
description { state: "default" 0;
rel1.relative: 0.25 0.25;
rel2.relative: 0.75 0.75;
image.normal: "efm_drive_cd_icon";
}
}
part { name: "e.cover_swallow"; type: SWALLOW;
scale: 1;
description { state: "default" 0;
rel1.offset: -4 -4;
rel2.offset: 3 3;
offscale;
}
}
part { name: "player_name_back"; type: RECT;
scale: 1;
description { state: "default" 0;
color: 0 0 0 128;
rel1.offset: -4 -4;
rel2.offset: 3 3;
rel2.to_y: "player_name";
offscale;
}
}
part { name: "player_name"; type: TEXT;
scale : 1;
description { state: "default" 0;
align: 0.5 0.0;
color: 255 255 255 255;
text.size: 10;
text.text: "Music player";
text.min: 0 1;
text.font: FNBD;
rel1.relative: 0.0 0.0;
rel2.relative: 1.0 0.0;
rel1.offset: 8 0;
rel2.offset: -9 0;
offscale;
}
}
part { name: "metadata"; type: TEXTBLOCK;
scale : 1;
description { state: "default" 0;
align: 0.5 0.0;
text {
style: "music_control_metadata_style";
text: "Song Title";
align: 0.0 0.0;
min: 0 0;
ellipsis: 0.0;
}
rel1.to_y: "player_name";
rel1.relative: 0.0 1.0;
rel1.offset: 8 8;
rel2.offset: -9 8;
offscale;
}
}
part { name: "btn_back"; type: RECT;
scale: 1;
description { state: "default" 0;
color: 0 0 0 128;
rel1.to_y: "previous_btn";
rel1.offset: -4 -4;
rel2.offset: 3 3;
offscale;
}
description { state: "pressed" 0.0;
inherit: "default" 0.0;
color: 0 0 0 220;
}
}
part { name: "play_btn";
scale: 1;
description { state: "default" 0;
fixed: 1 1;
min: 20 20;
max: 20 20;
align: 0.5 1.0;
image.normal: "icon_pause_mono.png";
}
description { state: "play" 0.0;
inherit: "default" 0.0;
image.normal: "icon_play_mono.png";
}
}
part { name: "previous_btn";
scale: 1;
description { state: "default" 0;
fixed: 1 1;
min: 20 20;
max: 20 20;
rel.to: "play_btn";
rel1.relative: -1.0 0.0;
rel2.relative: 0.0 1.0;
image.normal: "icon_prev_mono.png";
}
}
part { name: "next_btn";
scale: 1;
description { state: "default" 0;
fixed: 1 1;
min: 20 20;
max: 20 20;
rel.to: "play_btn";
rel1.relative: 1.0 0.0;
rel2.relative: 2.0 1.0;
image.normal: "icon_next_mono.png";
}
}
}
programs {
program {
signal: "mouse,down,1"; source: "*_btn";
action: STATE_SET "pressed" 0.0;
target: "btn_back";
}
program {
signal: "mouse,up,1"; source: "*_btn";
action: STATE_SET "default" 0.0;
transition: DECELERATE 1.0;
target: "btn_back";
}
program {
signal: "mouse,clicked,*"; source: "previous_btn";
action: SIGNAL_EMIT "btn,clicked" "previous";
}
program {
signal: "mouse,clicked,*"; source: "play_btn";
action: SIGNAL_EMIT "btn,clicked" "play";
}
program {
signal: "mouse,clicked,*"; source: "next_btn";
action: SIGNAL_EMIT "btn,clicked" "next";
}
program {
signal: "btn,state,image,play"; source: "play";
action: STATE_SET "play" 0.0;
transition: LINEAR 0.1;
target: "play_btn";
}
program {
signal: "btn,state,image,play,no_delay"; source: "play";
action: STATE_SET "play" 0.0;
transition: LINEAR 0.0;
target: "play_btn";
}
program {
signal: "btn,state,image,pause"; source: "play";
action: STATE_SET "default" 0.0;
transition: LINEAR 0.1;
target: "play_btn";
}
program {
signal: "mouse,clicked,*"; source: "player_name";
action: SIGNAL_EMIT "label,clicked" "player_name";
}
}
}