« get me outta code hell

Update tui-lib with scrollbar changes - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2019-05-12 17:18:54 -0300
committerFlorrie <towerofnix@gmail.com>2019-05-12 17:18:54 -0300
commita9f07edbfc6ea3f693ac3149e39616949671d650 (patch)
tree935795cdde71f9eead0eb6c0c649eba897d308af
parent81b46384295091465db6350cb44356abdc026514 (diff)
Update tui-lib with scrollbar changes
...and adapt the code to support the scrollbar being hidden (if there
aren't enough items to make the listing scrollable).
m---------tui-lib0
-rw-r--r--ui.js3
2 files changed, 2 insertions, 1 deletions
diff --git a/tui-lib b/tui-lib
-Subproject dff1213ae0069afcc0aa1b87daa6658732f742b
+Subproject d569cc0db9994295860f48d254f630211c1806a
diff --git a/ui.js b/ui.js
index b16a5ec..6e4582b 100644
--- a/ui.js
+++ b/ui.js
@@ -2429,8 +2429,9 @@ class ContextMenu extends FocusElement {
 
     let height = Math.min(10, this.form.inputs.length)
 
-    width += 3 // Space for the pane border and scrollbar
+    width += 2 // Space for the pane border
     height += 2 // Space for the pane border
+    if (this.form.scrollBarVisible) width++
     this.w = width
     this.h = height