diff options
| author | user <user@clank> | 2026-09-09 20:49:18 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-09-09 20:49:18 +0200 |
| commit | 2d006fdc97df7eecde0f49f94f24e096bcdebe28 (patch) | |
| tree | b0e45b3b4d2828ab119d645fed2350004909a9c5 /src/app_layout.c | |
| parent | pane: shift consumed by the character is consumed, tell the encoder (diff) | |
| download | slosh-2d006fdc97df7eecde0f49f94f24e096bcdebe28.tar.gz slosh-2d006fdc97df7eecde0f49f94f24e096bcdebe28.tar.xz slosh-2d006fdc97df7eecde0f49f94f24e096bcdebe28.zip | |
compact: the minimised bar sits below a shared line, not on the border
A compact pane owns no border cells -- its bottom border is the shared
line one cell outside its rect. With panes minimised, that cell was the
bar's top row: the chips sat directly on the bottom panes' content,
reading as frames cut into the pane. Classic panes carry their own
border row and never collided.
The layout now reserves one extra row above the bar in compact, and
draw_compact_lines strokes the boundary there: it joins the outer ring
with real junctions, a divider from above ends into it, and a focused
bottom pane re-strokes its stretch like any shared line.
Diffstat (limited to 'src/app_layout.c')
| -rw-r--r-- | src/app_layout.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/app_layout.c b/src/app_layout.c index 1b15f47..db43056 100644 --- a/src/app_layout.c +++ b/src/app_layout.c @@ -482,8 +482,15 @@ void layout(app_t *a) { bool no_room = false; cur(a)->min_bar = (rect_t){0, 0, 0, 0}; if (nmin) { - if (r.h >= (uint16_t)(MIN_PANE_ROWS + 5)) { - tree_r.h = (uint16_t)(r.h - 3); + /* Compact spends one row more: a compact pane's bottom border is the + * shared line one cell *outside* its rect, and with the bar directly + * below, that cell is the chips' top row -- the chips sat on the border. + * The extra row gives the line somewhere to live; draw_compact_lines + * strokes it. A classic pane carries its own bottom border and needs no + * such row. */ + uint16_t bar_rows = CFG.compact ? 4 : 3; + if (r.h >= (uint16_t)(MIN_PANE_ROWS + 2 + bar_rows)) { + tree_r.h = (uint16_t)(r.h - bar_rows); cur(a)->min_bar = (rect_t){r.x, (uint16_t)(r.y + r.h - 3), r.w, 3}; } else { no_room = true; |
