diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-24 09:54:28 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:14 -0300 |
| commit | 82c4f9e7212f569d6343dd03ddbab3520a784993 (patch) | |
| tree | 748f3e4edf2b97b3a57335e0b57eb6b1613f4e11 | |
| parent | a3ebcd08f9fb44d5e69ddafae238f83905ff5ba4 (diff) | |
| download | pardes-82c4f9e7212f569d6343dd03ddbab3520a784993.tar.gz pardes-82c4f9e7212f569d6343dd03ddbab3520a784993.zip | |
Rule off notice chips from the body the way a tagline is
A notice chip -- Msg output, an older message, the leader chord, a prompt --
is a piece of tagline hung over the body's top rows, but in the SDL shell it
ended in a bare edge while the tagline above it ends in a rule. It now has
the tagline's rule along its bottom: the chrome border colour, one pixel,
running on to the window edge when the chip does. A chip still falling into
place brings its rule with it, cut at its row's top like the chip.
The macOS shell already rules every non-workspace tag layer, notices
included; a terminal draws no rule under its tagline, so its chips get none
either.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
| -rw-r--r-- | src/gui/gui.zig | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/gui/gui.zig b/src/gui/gui.zig index 989f6b25..92ded62c 100644 --- a/src/gui/gui.zig +++ b/src/gui/gui.zig @@ -295,8 +295,9 @@ test "a persistent scene presents a new panel's frame zero before advancing it" for (second.panelTracks()) |track| try std.testing.expectEqual(@as(u16, 1), track.frame); } -// Per pane: background, rule, two grip strokes, and two square rails. -const pane_chrome_vertices: usize = 6 * 6; +// Per pane: background, rule, two grip strokes, two square rails, and the +// rule under each of its notice chips. +const pane_chrome_vertices: usize = 6 * (6 + pardes.Pane.Notices.max); const max_overlay_vertices: usize = 24 + pet.max_vertices + pardes.MAX_COLS * 6 + pardes.MAX_PANES * pane_chrome_vertices + touch_click_flash_vertices + max_touch_points * (1100 + max_touch_trail_points * overlay_circle_vertices); const font_px_step: f32 = 2.0; @@ -7297,6 +7298,21 @@ fn appendPaneChrome( appendSquareRail(builder, x0, thumb_y0, thumb_y1, layout.w, true, overlayRgb(chrome.scroll_thumb)); } } + // A notice chip is tagline hung over the body's top rows, so it is ruled + // off from the text beneath it the way a tagline is: the same colour and + // thickness along its bottom, running to the window edge when it does. + for (surface.tagLayers()) |*layer| { + if (layer.cols == 0 or layer.kind != .notice) continue; + const x0 = @as(f32, @floatFromInt(layer.viewport.x)) * layout.w; + const x1 = x0 + @as(f32, @floatFromInt(layer.viewport.w)) * layout.w; + const rule_x1 = if (builder.win_w - x1 < layout.w) @max(x1, builder.win_w) else x1; + const top = @as(f32, @floatFromInt(layer.viewport.y)) * layout.h; + // A band still falling into place is cut at its row's top; its rule + // comes with it, and shows only once it is below that cut. + const rule_y = top + (1 + layer.slide) * layout.h; + if (rule_y - 1 < top) continue; + builder.addRect(x0, rule_y - 1, rule_x1, rule_y, overlayRgb(chrome.border)); + } appendColumnSpines(core, surface.rows, layout, builder); } |
