diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 00:30:46 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:14 -0300 |
| commit | 232bfbbc4371a1fe9df210874118b4450dce7f9d (patch) | |
| tree | 6af9cfcc6e741082b15a270a6d80d3d182301ce5 /src/tag_layer.zig | |
| parent | 42748f92b77367db415c8b4d0f2e537a9e1ddde7 (diff) | |
| download | pardes-232bfbbc4371a1fe9df210874118b4450dce7f9d.tar.gz pardes-232bfbbc4371a1fe9df210874118b4450dce7f9d.zip | |
Let a pane's tag take a row for each line it holds
A tag that is a text can hold a newline, and the tagline, the body under it
and the pointer all assumed one row. The pane's tag now takes a row per line
(up to eight, and never the body's last row); the body starts below it, the
rows a pointer counts start the body after the tag's lines, a click on any
line puts the tag's cursor there, and a pixel shell gets a tag layer per
line. A tag of one line draws exactly as before.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/tag_layer.zig')
| -rw-r--r-- | src/tag_layer.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tag_layer.zig b/src/tag_layer.zig index 52da297d..ac7c4ac2 100644 --- a/src/tag_layer.zig +++ b/src/tag_layer.zig @@ -13,6 +13,8 @@ pub const Hit = struct { id: u16, serial: u32, col: u16, + /// Which line of a taller tag the layer draws. + line: u16 = 0, pixel_x: f32, pixel_y: f32, metrics: pardes.RowMetrics, @@ -21,6 +23,9 @@ pub const Layer = struct { kind: Kind = .workspace, id: u16 = 0, serial: u32 = 0, + /// A pane's tag taller than a line is drawn a layer to a line; this is + /// which one, counted from its first. + line: u16 = 0, viewport: pardes.Rect = .{ .x = 0, .y = 0, .w = 0, .h = 0 }, cols: u16 = 0, bg: [3]u8 = .{ 0, 0, 0 }, @@ -54,6 +59,7 @@ pub const Layer = struct { .kind = layer.kind, .id = layer.id, .serial = layer.serial, + .line = layer.line, .col = @intFromFloat(@min(@as(f32, @floatFromInt(layer.cols - 1)), @floor(dx / tw))), .pixel_x = x, .pixel_y = y, |
