diff options
| author | Peter Geissler <peter@haxx.in> | 2026-09-20 20:23:23 +0200 |
|---|---|---|
| committer | Peter Geissler <peter@haxx.in> | 2026-09-20 20:23:23 +0200 |
| commit | 07e1adf1124657aaea4fa32874282812281e4889 (patch) | |
| tree | ab63600e4438260e3e5c650bc711645fe21d066a /src/config.c | |
| parent | sidebar: a status can have more than one row (tab_bar_status_lines) (diff) | |
| download | slosh-07e1adf1124657aaea4fa32874282812281e4889.tar.gz slosh-07e1adf1124657aaea4fa32874282812281e4889.tar.xz slosh-07e1adf1124657aaea4fa32874282812281e4889.zip | |
sidebar: air between tabs (tab_gap)
A tab carrying three rows of wrapped status and the tab under it carrying
three more read as one column of text: the labels are in there, but the list
has stopped looking like a list. tab_gap is the blank rows between them, 0 by
default, which is exactly what the sidebar has always drawn.
It is the space *between* tabs and nothing else. Above the first tab is
tab_bar_pad's and before the button is newtab_pad's, so the gap is applied
before each label except the first and none of the three is ever paid twice.
Given up a row at a time when the list is short of room, ahead of every label
and the button, which is the same order the pad and the statuses already
follow: a gap that pushed a tab off the bottom would be spacing costing you
the thing it spaces. Paint rather than layout, so tuning it repaints without
reflowing any pane. Sidebars only -- the top strip is one row, and the space
between tabs there is the label's own padding.
Diffstat (limited to 'src/config.c')
| -rw-r--r-- | src/config.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c index f3662fd..b9e3c29 100644 --- a/src/config.c +++ b/src/config.c @@ -954,6 +954,7 @@ void config_defaults(config_t *c) { * a gap nobody asked for. Still there for a bare sidebar, or for anyone * who wants room at the top for a borderless window's own buttons. */ c->tab_bar_pad = 0; + c->tab_gap = 0; /* flush, the way the list has always read */ /* Three is enough for "the build, the tests, and one more thing" without a * chatty tab pushing the list off the bottom. */ c->tab_bar_status = 3; @@ -1686,6 +1687,8 @@ char *config_render(const config_t *c) { c->tab_bar_width); cb_add(&b, "tab_bar_pad %u // blank rows above a sidebar's tabs\n", c->tab_bar_pad); + cb_add(&b, "tab_gap %u // blank rows between a sidebar's tabs\n", + c->tab_gap); cb_add(&b, "tab_bar_status %u // pane status rows under each tab, 0 = off\n", c->tab_bar_status); @@ -2017,6 +2020,7 @@ static const char *const KNOWN_TOP[] = { "tab_bar_status", "tab_bar_status_lines", "tab_bar_width", + "tab_gap", "theme", "title_align", "title_inset", @@ -2229,6 +2233,8 @@ static bool load_into(config_t *c, const char *path, int depth, char *err, c->tab_bar_width); c->tab_bar_pad = (uint16_t)kdl_arg_int(kdl_child(root, "tab_bar_pad"), 0, c->tab_bar_pad); + c->tab_gap = + (uint16_t)kdl_arg_int(kdl_child(root, "tab_gap"), 0, c->tab_gap); c->tab_bar_status = (uint16_t)kdl_arg_int(kdl_child(root, "tab_bar_status"), 0, c->tab_bar_status); c->tab_bar_status_lines = (uint16_t)kdl_arg_int( |
