From d4485660aa6339dbe546a81f4b543d68dfbfa9ec Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 02:20:42 -0300 Subject: 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 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/gui/gui.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gui') 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); } -- cgit v1.3