diff options
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. |
