aboutsummaryrefslogtreecommitdiffstats
path: root/src/app_layout.c
diff options
context:
space:
mode:
authoruser <user@clank>2026-09-09 20:49:18 +0200
committeruser <user@clank>2026-09-09 20:49:18 +0200
commit2d006fdc97df7eecde0f49f94f24e096bcdebe28 (patch)
treeb0e45b3b4d2828ab119d645fed2350004909a9c5 /src/app_layout.c
parentpane: shift consumed by the character is consumed, tell the encoder (diff)
downloadslosh-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.c11
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;