Make pane scrollbars able to auto-hide after a short timeout. This

replaces the previous "modal" behaviour where the pane would be resized,
which tended to make a mess. Instead, the scrollbar appears when
scrolling or when hovered over with the mouse and disappears a
(configurable) short period later. From Michael Grant.
This commit is contained in:
nicm
2026-06-29 07:45:09 +00:00
parent 96899dc527
commit c29b41e527
14 changed files with 379 additions and 53 deletions

View File

@@ -65,7 +65,7 @@ static const char *options_table_cursor_style_list[] = {
"blinking-bar", "bar", NULL
};
static const char *options_table_pane_scrollbars_list[] = {
"off", "modal", "on", NULL
"off", "modal", "on", "auto-hide", NULL
};
static const char *options_table_pane_scrollbars_position_list[] = {
"right", "left", NULL
@@ -1595,7 +1595,17 @@ const struct options_table_entry options_table[] = {
.scope = OPTIONS_TABLE_WINDOW,
.choices = options_table_pane_scrollbars_list,
.default_num = PANE_SCROLLBARS_OFF,
.text = "Pane scrollbar state."
.text = "Pane scrollbar state: off, on, modal, or auto-hide."
},
{ .name = "pane-scrollbars-timeout",
.type = OPTIONS_TABLE_NUMBER,
.scope = OPTIONS_TABLE_WINDOW,
.minimum = 0,
.maximum = INT_MAX,
.default_num = 500,
.unit = "milliseconds",
.text = "Time before modal and auto-hide pane scrollbars disappear."
},
{ .name = "pane-scrollbars-style",