summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-05 02:20:42 -0300
committerGabriel Schneider <[email protected]>2026-11-05 09:54:56 -0300
commitd4485660aa6339dbe546a81f4b543d68dfbfa9ec (patch)
tree58318fd507577faa19b7dc48b523d691e546f8cd /src/gui
parent534f7da02ac58e475bb24801d315d7b736bd9c38 (diff)
downloadpardes-d4485660aa6339dbe546a81f4b543d68dfbfa9ec.tar.gz
pardes-d4485660aa6339dbe546a81f4b543d68dfbfa9ec.zip
the four gui unit tests that failed on the base pass: the behaviour tests allow the window's own rows (/status ends in `pointer in|out` on a window; a bare setting word moves a setting, a toggle to its other side and Lift, Crt or ShaderAnimation to their next state, and Shader and Pet, whose off means no file and no pet, take a name, not a flip); the tagline pointer-mapping test puts the workspace tag's text TAG_TEXT_INSET cells in, as it is drawn; the caret test that grew a tag past a row's end goes, as a tag wraps onto rows (up to MAX_TAG_ROWS) and no caret is past one
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui.zig6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/gui.zig b/src/gui/gui.zig
index a5b7f34a..a850cdca 100644
--- a/src/gui/gui.zig
+++ b/src/gui/gui.zig
@@ -3221,8 +3221,10 @@ test "tagline pointer mapping retains physical grips and carries logical text co
try std.testing.expectEqual(body_y, body.row);
try std.testing.expect(body.tag_hit == null);
- const topbar = gridCellAtDimensions(core, 3.5 * tag_w, 0.5 * body_h, body_w, body_h, tag_w);
- try std.testing.expectEqual(@as(u16, 2), topbar.col);
+ // The workspace tag's text starts TAG_TEXT_INSET cells in, as a pane's.
+ const x_top = @as(f32, @floatFromInt(pardes.TAG_TEXT_INSET)) * body_w + 3.5 * tag_w;
+ const topbar = gridCellAtDimensions(core, x_top, 0.5 * body_h, body_w, body_h, tag_w);
+ try std.testing.expectEqual(pixelCell(x_top, 10), topbar.col);
try std.testing.expectEqual(@as(u16, 3), topbar.tag_hit.?.col);
try std.testing.expectEqual(pardes.TagKind.workspace, topbar.tag_hit.?.kind);
}