diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-08 23:18:27 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-08 23:18:27 -0300 |
| commit | bfae9bec636129e78703bce3b156963686ab81dc (patch) | |
| tree | d3c7423424f6eddbd08dc56d33472dc04764a129 /src | |
| parent | 3e136122ecdc674e611016f5936b73bef3d26b01 (diff) | |
| download | pardes-bfae9bec636129e78703bce3b156963686ab81dc.tar.gz pardes-bfae9bec636129e78703bce3b156963686ab81dc.zip | |
gui: the workspace row's underlay is the tagline's ground: the window painted every tagline-role cell's band in the tag's colour under the cell's own, so a theme whose tagline is another colour (dark_plus's blue) showed the tag's gray at the row's left inset and between its cells like an anchor that is not there; the surface carries tagline_bg and the rows it covers, and the band takes it there
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src')
| -rw-r--r-- | src/draw.zig | 2 | ||||
| -rw-r--r-- | src/gui/gui.zig | 4 | ||||
| -rw-r--r-- | src/surface.zig | 5 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/draw.zig b/src/draw.zig index b0ba6687..1dc20477 100644 --- a/src/draw.zig +++ b/src/draw.zig @@ -198,6 +198,7 @@ pub fn render(p: *Pardes, arena: std.mem.Allocator) !*Surface { .border = chrome.border, .topbar_rule = config.gui_topbar_pane_border_rgb orelse chrome.border, .tag_bg = chrome.tag_bg, + .tagline_bg = chrome.tagline_bg, .tag_focus_bg = chrome.tag_active_bg, .tag_fg = chrome.tag_fg, .scroll_track = chrome.scroll_track, @@ -477,6 +478,7 @@ fn paintHeaders(p: *Pardes, s: *Surface) !void { const top = if (v.header != null and p.headerColumn() == null) v.header_top else 0; const layer = &s.tag_layers[MAX_PANES + MAX_COLS]; var viewport = region.rect; + s.chrome.tagline_rows = @intCast(viewport.y + viewport.h); const inset = @min(TAG_TEXT_INSET, viewport.w); s.fill(viewport.x, viewport.y, inset, viewport.h, .{ .bg = .{ .rgb = chrome.tagline_bg }, .fg = .{ .rgb = chrome.tagline_fg }, .font_role = .tagline }); viewport.x += inset; diff --git a/src/gui/gui.zig b/src/gui/gui.zig index 1873778a..f4424520 100644 --- a/src/gui/gui.zig +++ b/src/gui/gui.zig @@ -6064,8 +6064,10 @@ fn emitSurfaceCell( const role = cellFontRole(&line[at]); if (role == .tagline) { const here = line_cover[at]; + // The workspace row's underlay is its own ground (a theme's status + // bar), else the focused or plain tag's. const band_base: pardes.Cell = .{ - .style = .{ .bg = .{ .rgb = if (here.focus) chrome.tag_focus_bg else chrome.tag_bg }, .font_role = .tagline }, + .style = .{ .bg = .{ .rgb = if (row < chrome.tagline_rows) chrome.tagline_bg else if (here.focus) chrome.tag_focus_bg else chrome.tag_bg }, .font_role = .tagline }, .default = false, }; // The smaller font changes the ink, not the chrome's coverage. Painting diff --git a/src/surface.zig b/src/surface.zig index 15147146..5bee28d7 100644 --- a/src/surface.zig +++ b/src/surface.zig @@ -307,6 +307,11 @@ pub const Chrome = struct { /// The rule under the workspace tag. topbar_rule: [3]u8 = .{ 0, 0, 0 }, tag_bg: [3]u8 = .{ 0, 0, 0 }, + /// The workspace row's ground (a theme's status bar), and how many grid + /// rows from the top it covers: the window paints its underlay there in + /// this colour, not the tag's. + tagline_bg: [3]u8 = .{ 0, 0, 0 }, + tagline_rows: u16 = 0, /// The focused pane's and column's tag underlay. tag_focus_bg: [3]u8 = .{ 0, 0, 0 }, tag_fg: [3]u8 = .{ 0, 0, 0 }, |
