diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 12:20:17 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 15:17:05 -0300 |
| commit | ba3c654472ee0dd9fb5d39dd24063c07a44c6752 (patch) | |
| tree | 8db073c4fe9018ddf648a5ec9e746c02ff1cda73 /src/colors.zig | |
| parent | ecdb0996147f319a4427273bf276e1fc5bf89156 (diff) | |
| download | pardes-ba3c654472ee0dd9fb5d39dd24063c07a44c6752.tar.gz pardes-ba3c654472ee0dd9fb5d39dd24063c07a44c6752.zip | |
effects out, the lapis decor and Parallax: a theme's ornament (colors.Decor and Theme.decor: the page's dot grid, the scroll track's checker, the tag plaques with their frames, shadows and the focused one's stripes, the file name's shadow) goes with the Chrome's decor_* fields, name_ink and fx, the window's cell decor (CellDecor, the cells a plaque showed through and the blended pipeline they needed, the plaques drawn under the cells, addPattern, addDecorExcept, plaqueBox), ui.frag's dots and shadow, decor.frag's checker (flat fills alone now), the cell instance's second effect word (76 bytes an instance) and the Parallax word and setting; lapis keeps its colours, and lapis_plain, lapis on flat grounds, is lapis now and goes (theme.snap's lapis-plain frames and themesel's row of it, the window monkey's theme list, the site gallery's entry and shot)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/colors.zig')
| -rw-r--r-- | src/colors.zig | 67 |
1 files changed, 2 insertions, 65 deletions
diff --git a/src/colors.zig b/src/colors.zig index 90ed7b76..aec2917f 100644 --- a/src/colors.zig +++ b/src/colors.zig @@ -110,7 +110,7 @@ test "every native theme's separators stand off its page, and its focus tint off } test "every faithful port meets pardes's chrome floors in its own colours, with nothing left to derive" { - const first = comptime indexOfTheme("lapis_plain") + 1; + const first = comptime indexOfTheme("lapis") + 1; const last = comptime indexOfTheme("helix"); for (themes[first..last]) |*th| { const chrome = ChromeTheme.fromTheme(th); @@ -277,42 +277,6 @@ pub fn mix(a: [3]u8, b: [3]u8) [3]u8 { return out; } -/// A theme's ornament, drawn by a pixel shell inside the chrome it already -/// has (docs/render-pipeline.md ยง10: no gaps between panes): the lapis -/// theme's. Sizes are logical pixels. None of it touches a focus indicator: -/// the dots lie on the page's own ground, the checker in the scroll track -/// (never its thumb), a tag's plaque inside its band beside its grip (and -/// the focused one only the more striking), and the shadow under a file -/// name's own letters. -pub const Decor = struct { - /// A dot grid on the page's ground, `page_dot_alpha` of 255 strong, a - /// dot one logical pixel across (fading out by a pixel and a half) every - /// `page_dot_px`, fixed to the window. - page_dots: ?[3]u8 = null, - page_dot_alpha: u8 = 0x22, - page_dot_px: u8 = 22, - /// A checker in the scroll track, squares of `rail_checker_px`, this - /// colour and the track's. - rail_checker: ?[3]u8 = null, - rail_checker_px: u8 = 3, - /// Every tag drawn as a raised plaque inside its own band (the site's - /// trail and title bars): a `tag_border` frame round the text, a hard - /// `tag_shadow` offset down and right by `tag_shadow_px`, both within - /// the band's rows and columns, never past them; the focused pane's - /// plaque striped `tag_stripe` and the tag's ground, `tag_stripe_px` - /// each, its words on plates of the ground. Column and workspace tags - /// take a quieter one (a one-pixel frame, a shadow of two, no stripes). - tag_border: ?[3]u8 = null, - tag_border_px: u8 = 2, - tag_shadow: ?[3]u8 = null, - tag_shadow_px: u8 = 5, - tag_stripe: ?[3]u8 = null, - tag_stripe_px: u8 = 2, - /// The file name's offset shadow, down and right, in a pane's tag. - title_shadow: ?[3]u8 = null, - title_shadow_px: u8 = 2, -}; - pub const Theme = struct { name: []const u8, bg: ?[3]u8, @@ -378,8 +342,6 @@ pub const Theme = struct { /// in pixels at a 17px tagline, the thumb one narrower (acme's 12px /// Scrollwid, the default). rail_px: ?u8 = null, - /// A pixel shell's ornament (Decor): lapis's. - decor: ?Decor = null, }; /// One family, its twelve backgrounds a theme each (`curated`). @@ -403,7 +365,6 @@ const curated = struct { pub const orchard_black = @import("themes/orchard_black.zig"); pub const acme = @import("themes/acme.zig"); pub const lapis = @import("themes/lapis.zig"); - pub const lapis_plain = @import("themes/lapis_plain.zig"); // Faithful ports of well-known themes, a family at a time (src/themes/ // <name>.zig says where each value came from): `theme_groups`. pub const dark_plus = @import("themes/dark_plus.zig"); @@ -483,15 +444,7 @@ fn fold(comptime C: type) [@typeInfo(C).@"struct".decl_names.len]Theme { var t: Theme = undefined; const source = @field(C, d).theme; for (theme_info.field_names, theme_info.field_types, theme_info.field_attrs) |name, T, attrs| { - @field(t, name) = if (T == ?Decor and @hasField(@TypeOf(source), name)) decor: { - // A nested literal is folded field by field too. - var decor: Decor = .{}; - const given = @field(source, name); - for (@typeInfo(Decor).@"struct".field_names) |g| if (@hasField(@TypeOf(given), g)) { - @field(decor, g) = @field(given, g); - }; - break :decor decor; - } else if (@hasField(@TypeOf(source), name)) + @field(t, name) = if (@hasField(@TypeOf(source), name)) @field(source, name) else if (attrs.defaultValue(T)) |value| value @@ -573,22 +526,6 @@ test "seoul256's twelve backgrounds ring in their order, after Catppuccin and be try std.testing.expectEqualStrings("zenbones_light", themes[first + names.len].name); } -test "lapis_plain is lapis on flat grounds, framed and shadowed as lapis" { - const lapis = themes[indexOfTheme("lapis")]; - const plain = themes[indexOfTheme("lapis_plain")]; - try std.testing.expectEqual(indexOfTheme("lapis") + 1, indexOfTheme("lapis_plain")); - var same = plain; - same.name = lapis.name; - same.decor = lapis.decor; - try std.testing.expectEqualDeep(lapis, same); - const decor = plain.decor.?; - try std.testing.expect(decor.page_dots == null and decor.tag_stripe == null); - try std.testing.expectEqualDeep(lapis.decor.?.tag_border, decor.tag_border); - try std.testing.expectEqualDeep(lapis.decor.?.tag_shadow, decor.tag_shadow); - try std.testing.expectEqualDeep(lapis.decor.?.title_shadow, decor.title_shadow); - try std.testing.expectEqualDeep(lapis.decor.?.rail_checker, decor.rail_checker); -} - /// Original and classic-inspired Pardes palettes precede retained imports. pub const native_theme_count = 15; |
