summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-01-09 04:08:15 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-01-09 04:08:15 +0000
commitea58594838295a8e1cb755a96d391f369e4a05ce (patch)
tree46bf440731d7681c269ceeb41e94a9429c059c51 /data
parentc22a6c5d5c5a96f757f608c22a064fd9029004bf (diff)
handle 0 length and hide lenght info
Diffstat (limited to 'data')
-rw-r--r--data/elementary/themes/edc/music_control.edc23
1 files changed, 16 insertions, 7 deletions
diff --git a/data/elementary/themes/edc/music_control.edc b/data/elementary/themes/edc/music_control.edc
index 849756d94c..4fa16bcd6f 100644
--- a/data/elementary/themes/edc/music_control.edc
+++ b/data/elementary/themes/edc/music_control.edc
@@ -86,14 +86,23 @@ group { name: "e/modules/music-control/popup";
86 pos = getfarg(2); 86 pos = getfarg(2);
87 len = getfarg(3); 87 len = getfarg(3);
88 88
89 timeprint(txt, 128, pos, len); 89 if (len > 0.0) {
90 set_text(PART:"pos_txt", txt); 90 timeprint(txt, 128, pos, len);
91 timeprint(txt, 128, len, len); 91 set_text(PART:"pos_txt", txt);
92 set_text(PART:"len_txt", txt); 92 timeprint(txt, 128, len, len);
93 set_text(PART:"len_txt", txt);
93 94
94 custom_state(PART:"pos", "default", 0.0); 95 custom_state(PART:"pos", "default", 0.0);
95 set_state_val(PART:"pos", STATE_REL2, (pos / len), 1.0); 96 set_state_val(PART:"pos", STATE_REL2, (pos / len), 1.0);
96 set_state(PART:"pos", "custom", 0.0) 97 set_state(PART:"pos", "custom", 0.0)
98 } else {
99 set_text(PART:"pos_txt", "");
100 set_text(PART:"len_txt", "");
101
102 custom_state(PART:"pos", "default", 0.0);
103 set_state_val(PART:"pos", STATE_REL2, 0.0, 1.0);
104 set_state(PART:"pos", "custom", 0.0)
105 }
97 } 106 }
98 } 107 }
99 } 108 }