From 5b21b38bf5358d40e37de83260a3b9298380c782 Mon Sep 17 00:00:00 2001 From: Florrie Date: Tue, 12 Jun 2018 23:56:19 -0300 Subject: group.comment support / new help message ..mentioning that you can add stuff to ~/Music to make it show up in the default mtui playlist. --- ui.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'ui.js') 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 -- cgit 1.3.0-6-gf8a5