« get me outta code hell

Space for scrollbar in menu - 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>2018-07-25 13:27:03 -0300
committerFlorrie <towerofnix@gmail.com>2018-07-25 13:28:07 -0300
commitf65b272760048331e142bf9c97be952dc87166ed (patch)
treef4f543c8113a5cd66d5f7f47b252baafcb83d5aa
parent2d6eb315c47ea5064b8ec93b98ecba4f5da75852 (diff)
Space for scrollbar in menu
-rw-r--r--todo.txt3
-rw-r--r--ui.js4
2 files changed, 5 insertions, 2 deletions
diff --git a/todo.txt b/todo.txt
index 0227763..76f0c2e 100644
--- a/todo.txt
+++ b/todo.txt
@@ -93,3 +93,6 @@ TODO: Press "M" to show a context menu.
 TODO: Figure out a keybinding for Mark (in edit mode) - probably Ctrl-M.
       (I prefer Ctrl to be used for functions that will open a dialog of some
       sort, though..)
+
+TODO: Only show scrollbars if the form is actually scrollable. (This would make
+      context menus look better.)
diff --git a/ui.js b/ui.js
index afb2731..f92d259 100644
--- a/ui.js
+++ b/ui.js
@@ -1477,8 +1477,8 @@ class ContextMenu extends FocusElement {
 
     let height = Math.min(10, this.form.inputs.length)
 
-    width += 2 // Space for the pane border
-    height += 2
+    width += 3 // Space for the pane border and scrollbar
+    height += 2 // Space for the pane border
     this.w = width
     this.h = height