autohide artist/album text
This commit is contained in:
parent
4dfd720a14
commit
e70b5212a0
|
@ -13,6 +13,7 @@ collections {
|
|||
public lyrics_visible;
|
||||
public playlist_visible;
|
||||
public controls_visible;
|
||||
public info_visible;
|
||||
|
||||
public hide_playlist() {
|
||||
/* https://phab.enlightenment.org/T905 */
|
||||
|
@ -20,6 +21,8 @@ collections {
|
|||
stop_program(get_program_id("playlist_show_start")); \
|
||||
if (get_int(lyrics_visible)) \
|
||||
run_program(get_program_id("lyrics_show")); \
|
||||
if (get_int(info_visible)) \
|
||||
set_state(PART:"info_clip", "visible", 0.0); \
|
||||
set_int(playlist_visible, 0); \
|
||||
run_program(get_program_id("playlist_hide_start"));
|
||||
|
||||
|
@ -223,9 +226,9 @@ collections {
|
|||
after: "lyrics_hide_start";
|
||||
}
|
||||
|
||||
#define TEXT_ANIMATOR(NAME, OWNER, TEXTINFO) \
|
||||
#define TEXT_ANIMATOR(NAME, CLIP, OWNER, TEXTINFO) \
|
||||
part { name: NAME"_clip"; type: RECT; mouse_events: 0; \
|
||||
clip_to: "bgchooser_active_clip"; \
|
||||
clip_to: CLIP; \
|
||||
description { state: "default"; \
|
||||
} \
|
||||
description { state: "left"; \
|
||||
|
@ -236,7 +239,7 @@ collections {
|
|||
} \
|
||||
} \
|
||||
part { name: NAME"_animator"; type: TEXT; mouse_events: 0; \
|
||||
clip_to: "bgchooser_active_clip"; \
|
||||
clip_to: CLIP; \
|
||||
effect: GLOW; \
|
||||
scale: 1; \
|
||||
description { state: "default"; \
|
||||
|
@ -315,9 +318,64 @@ collections {
|
|||
program { name: NAME"3"; \
|
||||
action: STATE_SET "default" 0.0; \
|
||||
target: NAME"_clip"; \
|
||||
after: NAME"_done"; \
|
||||
} \
|
||||
program { name: NAME"_done"; \
|
||||
action: SIGNAL_EMIT NAME"_done" "empc"; \
|
||||
}
|
||||
|
||||
/* TEXT */
|
||||
part { name: "info_clip"; type: RECT; mouse_events: 0;
|
||||
clip_to: "bgchooser_active_clip";
|
||||
description { state: "default";
|
||||
visible: 0;
|
||||
color: 255 255 255 0;
|
||||
}
|
||||
description { state: "visible";
|
||||
}
|
||||
}
|
||||
program { signal: "empc,album,change,*"; source: "empc";
|
||||
filter: EMPC_BASE_SWALLOW_PLAYLIST "default";
|
||||
script {
|
||||
set_state(PART:"info_clip", "visible", 0.0);
|
||||
set_int(info_visible, 1);
|
||||
}
|
||||
}
|
||||
program { name: "info_hide";
|
||||
action: STATE_SET "default" 0.0;
|
||||
transition: LINEAR 0.2;
|
||||
target: "info_clip";
|
||||
}
|
||||
program { signal: "album_done"; source: "empc";
|
||||
filter: "info_clip" "visible";
|
||||
in: 3.0 0.0;
|
||||
script {
|
||||
set_int(info_visible, 0);
|
||||
run_program(get_program_id("info_hide"));
|
||||
}
|
||||
}
|
||||
program { signal: "artist_done"; source: "empc";
|
||||
filter: "info_clip" "visible";
|
||||
in: 3.0 0.0;
|
||||
script {
|
||||
set_int(info_visible, 0);
|
||||
run_program(get_program_id("info_hide"));
|
||||
}
|
||||
}
|
||||
program { signal: "empc,artist,change,*"; source: "empc";
|
||||
filter: EMPC_BASE_SWALLOW_PLAYLIST "default";
|
||||
script {
|
||||
set_state(PART:"info_clip", "visible", 0.0);
|
||||
set_int(info_visible, 1);
|
||||
}
|
||||
}
|
||||
program { signal: "empc,album,change,*"; source: "empc";
|
||||
filter: EMPC_BASE_SWALLOW_PLAYLIST "default";
|
||||
script {
|
||||
set_state(PART:"info_clip", "visible", 0.0);
|
||||
set_int(info_visible, 1);
|
||||
}
|
||||
}
|
||||
part { name: EMPC_BASE_TEXT_ARTIST; type: TEXT; mouse_events: 0;
|
||||
clip_to: "artist_clip";
|
||||
effect: GLOW;
|
||||
|
@ -337,7 +395,8 @@ collections {
|
|||
}
|
||||
}
|
||||
}
|
||||
TEXT_ANIMATOR("artist", EMPC_BASE_TEXT_ARTIST, fit: 1 0;)
|
||||
TEXT_ANIMATOR("artist", "info_clip", EMPC_BASE_TEXT_ARTIST, fit: 1 0;)
|
||||
|
||||
part { name: EMPC_BASE_TEXT_ALBUM; type: TEXT; mouse_events: 0;
|
||||
clip_to: "album_clip";
|
||||
effect: GLOW;
|
||||
|
@ -359,7 +418,7 @@ collections {
|
|||
}
|
||||
}
|
||||
}
|
||||
TEXT_ANIMATOR("album", EMPC_BASE_TEXT_ALBUM, fit: 1 0;)
|
||||
TEXT_ANIMATOR("album", "info_clip", EMPC_BASE_TEXT_ALBUM, fit: 1 0;)
|
||||
|
||||
/* MODES */
|
||||
part { name: EMPC_BASE_SWALLOW_REPEAT; type: SWALLOW;
|
||||
|
@ -439,7 +498,7 @@ collections {
|
|||
}
|
||||
}
|
||||
}
|
||||
TEXT_ANIMATOR("title", EMPC_BASE_TEXT_TITLE, fit: 1 1;)
|
||||
TEXT_ANIMATOR("title", "bgchooser_active_clip", EMPC_BASE_TEXT_TITLE, fit: 1 1;)
|
||||
|
||||
|
||||
part { name: "fader"; type: RECT; mouse_events: 0;
|
||||
|
@ -465,15 +524,14 @@ collections {
|
|||
part { name: EMPC_BASE_SWALLOW_PLAYLIST; type: SWALLOW;
|
||||
description { state: "default";
|
||||
fixed: 1 1;
|
||||
rel1.relative: 1 1;
|
||||
rel1.to_y: EMPC_BASE_TEXT_ALBUM;
|
||||
rel1.relative: 1 0;
|
||||
rel1.to_x: "base";
|
||||
rel2.relative: 2 0;
|
||||
rel2.to_y: EMPC_BASE_TEXT_TITLE;
|
||||
}
|
||||
description { state: "visible";
|
||||
inherit: "default";
|
||||
rel1.relative: 0 1;
|
||||
rel1.relative: 0 0;
|
||||
rel2.relative: 1 0;
|
||||
}
|
||||
}
|
||||
|
@ -571,6 +629,8 @@ collections {
|
|||
signal: "empc,playlist,show"; source: "empc";
|
||||
script {
|
||||
if ((!get_int(playlist_visible)) && (!get_int(bg_chooser))) {
|
||||
if (get_int(info_visible))
|
||||
run_program(get_program_id("info_hide"));
|
||||
set_int(playlist_visible, 1);
|
||||
stop_program(get_program_id("playlist_hide_start"));
|
||||
if (get_int(lyrics_visible))
|
||||
|
|
Loading…
Reference in New Issue