╭ changed ────╮ │build.zig.zon│ ╰─────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 3 .version = "0.0.0", │ │ 4 .dependencies = .{ │ │ 5 .xit = .{ │ │ 6 - .url = "git+https://github.com/xit-vcs/xit#125858711049dc26dbdd96da2d780aa1e7b61d5a",│ │ 7 - .hash = "xit-0.0.0-Ub3nDLTjTwGhPG74urz2RWgJpTxUOZuJlXv8EewpgGTh", │ │ 6 + .url = "git+https://github.com/xit-vcs/xit#1720974f8a5838911f49a1f0860903a486aad187",│ │ 7 + .hash = "xit-0.0.0-Ub3nDLTjTwFHd50Y_8iD0214P_5FvzxkG1P_Jgu64lcs", │ │ 8 }, │ │ 9 }, │ │10 .paths = .{ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Home/Header.zig│ ╰──────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────╮ │38 { │ │39 var title_view = try ui.Title.View.init(allocator, &data.title);│ │40 errdefer title_view.deinit(allocator); │ │41 + // shrink the title when there is not enough space │ │42 try box.children.put(allocator, title_view.getFocus().id, .{ │ │43 .widget = .{ .title = title_view }, │ │44 .rect = null, │ ╰────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────╮ │44 - .min_size = .{ .width = data.title.width, .height = null },│ │45 + .min_size = null, │ │46 + .shrink = true, │ │47 }); │ │48 } │ │49 │ ╰───────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────╮ │70 try box.children.put(allocator, spacer.getFocus().id, .{│ │71 .widget = .{ .spacer = spacer }, │ │72 .rect = null, │ │71 - .min_size = .{ .width = 1, .height = null }, │ │73 + .min_size = null, │ │74 }); │ │75 } │ │76 // auth │ ╰────────────────────────────────────────────────────────────────────────────╯ ╭ changed ───────╮ │src/ui/Title.zig│ ╰────────────────╯ ╭────────────────────────────────────╮ │ 9 const Focus = xitui.focus.Focus;│ │10 │ │11 content: []const u8, │ │12 -width: usize, │ │12 │ │13 const Self = @This(); │ │14 │ ╰────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │15 pub fn init(arena: *std.heap.ArenaAllocator, orig_content: []const u8) !Self {│ │17 - const rendered = try renderTitle(arena.allocator(), orig_content); │ │18 - // count cells in the first row: one per UTF-8 codepoint start │ │19 - var width: usize = 0; │ │20 - for (rendered) |byte| { │ │21 - if (byte == '\n') break; │ │22 - if (byte & 0xC0 != 0x80) width += 1; │ │23 - } │ │16 return .{ │ │25 - .content = rendered, │ │26 - .width = width, │ │17 + .content = try renderTitle(arena.allocator(), orig_content), │ │18 }; │ │19 } │ │20 │ ╰──────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/User/Header.zig│ ╰──────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────╮ │42 errdefer title_view.deinit(allocator); │ │43 title_view.getFocus().focusable = true; │ │44 title_view.getFocus().kind = .{ .custom = "a:/" }; │ │45 + // shrink the title when there is not enough space │ │46 try box.children.put(allocator, title_view.getFocus().id, .{│ │47 .widget = .{ .title = title_view }, │ │48 .rect = null, │ ╰────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────╮ │48 - .min_size = .{ .width = data.title.width, .height = null },│ │49 + .min_size = null, │ │50 + .shrink = true, │ │51 }); │ │52 } │ │53 │ ╰───────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────╮ │92 try box.children.put(allocator, spacer.getFocus().id, .{│ │93 .widget = .{ .spacer = spacer }, │ │94 .rect = null, │ │93 - .min_size = .{ .width = 1, .height = null }, │ │95 + .min_size = null, │ │96 }); │ │97 } │ │98 │ ╰────────────────────────────────────────────────────────────────────────╯