diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 18:14:36 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | f41d0209f65237568c9f7d527d5989ac8921b74c (patch) | |
| tree | c313dc20fa0593ecff725de32d6ad191b01d82ac /src/detached | |
| parent | b4781b334a06d16aedb0b6a3d604cb249eb619de (diff) | |
| download | pardes-f41d0209f65237568c9f7d527d5989ac8921b74c.tar.gz pardes-f41d0209f65237568c9f7d527d5989ac8921b74c.zip | |
Lift takes a style: shadow, surface, rim, glow or auto
The user wants Lift to read on dark themes, where a shadow has nothing to
darken. `Lift shadow|surface|rim|glow|auto` (`on` is auto, bare flips
auto and off): surface lightens the lifted part's ground about 5.5%
(Material-dark), rim is a thin soft light off its top and left edges,
glow a faint halo in the theme's accent (Chrome.accent, the focused box
colour), auto a shadow on a light page and surface with half a rim on a
dark one (by the page's luminance). Rim and glow are the soft kernel in a
light colour (no pre-warp: coloured light is laid on as is, within ยง8.2's
budget); each style is capped per theme so text keeps min(its contrast,
4.5) (tests: darkening and lightening over the native themes). The style
travels in the palette (Chrome.lift_style, one byte on the wire). Config
reports and ctl reads `Lift <style>`.
Shared files touched: config.zig, builtins.zig, ninep/ctl.zig,
detached/wire.zig (palette byte), gui.zig. Not touched: pardes.zig,
Messages.zig, mouse.zig.
Diffstat (limited to 'src/detached')
| -rw-r--r-- | src/detached/wire.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/detached/wire.zig b/src/detached/wire.zig index 6e3b2d01..0a066410 100644 --- a/src/detached/wire.zig +++ b/src/detached/wire.zig @@ -267,6 +267,8 @@ pub const Frame = struct { rgb.* = .{ 0, 0, 0 }; for (&rgb.*.?) |*channel| channel.* = try r.getByte(); } + } else if (field.type == u8) { + rgb.* = try r.getByte(); } else for (rgb) |*channel| channel.* = try r.getByte(); } try r.end(); @@ -816,6 +818,8 @@ pub fn encodeFrameLayers(out: []u8, cols: u16, rows: u16, cursor: ?Cursor, point if (field.type == ?[3]u8) { try w.putBool(rgb != null); if (rgb) |value| for (value) |channel| try w.putByte(channel); + } else if (field.type == u8) { + try w.putByte(rgb); } else for (rgb) |channel| try w.putByte(channel); } } |
