diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-07 00:27:21 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-07 00:35:46 -0300 |
| commit | f316b46caea6ecf947989114c37af8288b37dbf5 (patch) | |
| tree | b238920cceac3bca73add04e6fb75071751bf515 /src/colors.zig | |
| parent | fd2c34a10911d6c577e429bfde4433e23c8eb6c7 (diff) | |
| download | pardes-f316b46caea6ecf947989114c37af8288b37dbf5.tar.gz pardes-f316b46caea6ecf947989114c37af8288b37dbf5.zip | |
themes: a theme may colour the tagline (the workspace row) on its own, tagline_bg and tagline_fg, an editor's status bar, resolved to the tag's colours without them (ChromeTheme); dark_plus takes VS Code's statusBar.background #007acc with white text, cited; the chrome floors test holds the pair to 4.5:1 and the default to the tag's; the theme and themesel snapshots move by that row
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/colors.zig')
| -rw-r--r-- | src/colors.zig | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/colors.zig b/src/colors.zig index f9e5495f..cb5dbe75 100644 --- a/src/colors.zig +++ b/src/colors.zig @@ -122,6 +122,10 @@ test "every faithful port meets pardes's chrome floors in its own colours, with try std.testing.expect(contrast(th.tag_active_fg.?, th.tag_active_bg.?) >= 4.5); try std.testing.expect(contrast(th.box_dim, th.tag_bg) >= 1.5); try std.testing.expect(th.palette != null); + // A status bar of its own reads as tag text does; without one the + // tagline is the tag's. + try std.testing.expect(contrast(chrome.tagline_fg, chrome.tagline_bg) >= 4.5); + if (th.tagline_bg == null) try std.testing.expectEqual(th.tag_bg, chrome.tagline_bg); } } @@ -297,6 +301,10 @@ pub const Theme = struct { // editor palettes keep working; ChromeTheme resolves their legacy defaults. tag_active_bg: ?[3]u8 = null, tag_active_fg: ?[3]u8 = null, + /// The workspace row (the tagline): an editor's status bar in its own + /// colours, where it has them; else the tag's. + tagline_bg: ?[3]u8 = null, + tagline_fg: ?[3]u8 = null, /// Filename/output-name accent, also used by the Term command. tag_name_fg: ?[3]u8 = null, /// Active tint; absence preserves the shared name tint or active tag ink. @@ -541,6 +549,8 @@ comptime { pub const ChromeTheme = struct { tag_bg: [3]u8, tag_fg: [3]u8, + tagline_bg: [3]u8, + tagline_fg: [3]u8, tag_active_bg: [3]u8, tag_active_fg: [3]u8, tag_name_fg: [3]u8, @@ -575,6 +585,8 @@ pub const ChromeTheme = struct { return .{ .tag_bg = th.tag_bg, .tag_fg = th.tag_fg, + .tagline_bg = th.tagline_bg orelse th.tag_bg, + .tagline_fg = th.tagline_fg orelse th.tag_fg, .tag_active_bg = active_bg, .tag_active_fg = active_fg, .tag_name_fg = name_fg, @@ -739,7 +751,6 @@ pub fn finishThemeInitialization(p: *Pardes) void { p.chrome = ChromeTheme.fromTheme(p.theme()); } - /// Themes near `name`, a line of them, for a Theme given a name there is /// none of (all of them, Themes, are too many for a refused write): every /// one sharing its first letter when they fit in `buf`, else the 8 nearest. |
