diff options
-rw-r--r-- | ui.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ui.js b/ui.js index b030358..3df7272 100644 --- a/ui.js +++ b/ui.js @@ -1054,9 +1054,6 @@ class PlaybackInfoElement extends DisplayElement { fixLayout() { const centerX = el => el.x = Math.round((this.w - el.w) / 2) - centerX(this.progressTextLabel) - centerX(this.trackNameLabel) - centerX(this.downloadLabel) this.trackNameLabel.y = 0 this.progressBarLabel.y = 1 @@ -1071,6 +1068,10 @@ class PlaybackInfoElement extends DisplayElement { } this.downloadLabel.text = `(From: ${dlText})` } + + centerX(this.progressTextLabel) + centerX(this.trackNameLabel) + centerX(this.downloadLabel) } updateProgress({timeDone, timeLeft, duration, lenSecTotal, curSecTotal}) { @@ -1082,6 +1083,8 @@ class PlaybackInfoElement extends DisplayElement { updateTrack(track) { this.currentTrack = track this.trackNameLabel.text = track.name + this.progressBarLabel.text = '' + this.progressTextLabel.text = '(Starting..)' this.fixLayout() } |