From 662ab7324567e093ff432991cefbd3293a68cea6 Mon Sep 17 00:00:00 2001 From: Florrie Date: Sat, 2 Jun 2018 23:28:46 -0300 Subject: Downloader-arg label ('from: url') --- ui.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ui.js') diff --git a/ui.js b/ui.js index 5ff4cba..5177aed 100644 --- a/ui.js +++ b/ui.js @@ -81,7 +81,7 @@ class AppElement extends FocusElement { this.h = this.parent.contentH this.paneLeft.w = Math.max(Math.floor(0.8 * this.contentW), this.contentW - 80) - this.paneLeft.h = this.contentH - 4 + this.paneLeft.h = this.contentH - 5 this.paneRight.x = this.paneLeft.right this.paneRight.w = this.contentW - this.paneLeft.right this.paneRight.h = this.paneLeft.h @@ -468,16 +468,21 @@ class PlaybackInfoElement extends DisplayElement { this.trackNameLabel = new Label('') this.addChild(this.trackNameLabel) + + this.downloadLabel = new Label('') + this.addChild(this.downloadLabel) } 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 this.progressTextLabel.y = this.progressBarLabel.y + this.downloadLabel.y = 2 } updateProgress({timeDone, timeLeft, duration, lenSecTotal, curSecTotal}) { @@ -488,6 +493,7 @@ class PlaybackInfoElement extends DisplayElement { updateTrack(track) { this.trackNameLabel.text = track.name + this.downloadLabel.text = `(From: ${track.downloaderArg})` this.fixLayout() } } -- cgit 1.3.0-6-gf8a5