diff options
author | Florrie <towerofnix@gmail.com> | 2018-06-12 23:56:19 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-06-12 23:56:21 -0300 |
commit | 5b21b38bf5358d40e37de83260a3b9298380c782 (patch) | |
tree | 567a61f5671f0f5bd25e659b20c7ad5ca6e5924c /ui.js | |
parent | 13f49822f637ca5582f593bcc0dae8a5003390f3 (diff) |
group.comment support / new help message
..mentioning that you can add stuff to ~/Music to make it show up in the default mtui playlist.
Diffstat (limited to 'ui.js')
-rw-r--r-- | ui.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ui.js b/ui.js index 9d92229..a20fb52 100644 --- a/ui.js +++ b/ui.js @@ -11,6 +11,7 @@ const Label = require('./tui-lib/ui/Label') const ListScrollForm = require('./tui-lib/ui/form/ListScrollForm') const Pane = require('./tui-lib/ui/Pane') const RecordStore = require('./record-store') +const WrapLabel = require('./tui-lib/ui/WrapLabel') const telc = require('./tui-lib/util/telchars') const unic = require('./tui-lib/util/unichars') @@ -435,11 +436,19 @@ class GrouplikeListingElement extends FocusElement { this.pathElement = new PathElement() this.addChild(this.pathElement) + + this.commentLabel = new WrapLabel() + this.addChild(this.commentLabel) } fixLayout() { + this.commentLabel.w = this.contentW + this.form.w = this.contentW - this.form.h = this.contentH - 1 + this.form.h = this.contentH + this.form.y = this.commentLabel.bottom + this.form.h -= this.commentLabel.h + this.form.h -= this.pathElement.h this.pathElement.y = this.contentH - 1 this.pathElement.w = this.contentW @@ -475,6 +484,8 @@ class GrouplikeListingElement extends FocusElement { throw new Error('Attempted to call buildItems before a grouplike was loaded') } + this.commentLabel.text = this.grouplike.comment || '' + const wasSelected = this.isSelected const form = this.form |