╭ changed ──────────────╮ │src/ui/Repo/Comment.zig│ ╰───────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │179 .unknown => "", │ │180 .email, .user_name => |text| text, │ │181 } else ""; │ │182 - var parent = try wgt.TextBox(ui.Widget).init(allocator, parent_text, .{│ │182 + var parent = try wgt.TextBox.init(allocator, parent_text, .{ │ │183 .border_style = .single, │ │184 .rounded_corners = true, │ │185 .wrap_kind = .none, │ ╰────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │203 } │ │204 │ │205 const body_text = if (entry.comment.removed) "(removed)" else entry.comment.event.body; │ │206 - var body_box = try wgt.TextBox(ui.Widget).init(allocator, body_text, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .word });│ │206 + var body_box = try wgt.TextBox.init(allocator, body_text, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .word }); │ │207 errdefer body_box.deinit(allocator); │ │208 body_box.getFocus().focusable = true; │ │209 try box.children.put(allocator, body_box.getFocus().id, .{ .widget = .{ .text_box = body_box }, .rect = null, .min_size = null }); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │210 │ │211 - var gap = try wgt.Text(ui.Widget).init(allocator, ""); │ │211 + var gap = try wgt.Text.init(allocator, ""); │ │212 errdefer gap.deinit(allocator); │ │213 try box.children.put(allocator, gap.getFocus().id, .{ .widget = .{ .text = gap }, .rect = null, .min_size = null });│ │214 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────╮ │221 return &self.box.children.values()[metadata_index].widget.box; │ │222 } │ │223 │ │224 - fn body(self: *Item) *wgt.TextBox(ui.Widget) { │ │224 + fn body(self: *Item) *wgt.TextBox { │ │225 return &self.box.children.values()[body_index].widget.text_box;│ │226 } │ │227 │ ╰────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │291 pub fn appendCount(allocator: std.mem.Allocator, box: *wgt.Box(ui.Widget), count: usize, singular: []const u8, plural: []const u8) !void {│ │292 var text_buf: [64]u8 = undefined; │ │293 const text = try std.fmt.bufPrint(&text_buf, "{d} {s}", .{ count, if (count == 1) singular else plural }); │ │294 - var count_box = try wgt.TextBox(ui.Widget).init(allocator, text, .{ .border_style = .hidden, .wrap_kind = .none }); │ │294 + var count_box = try wgt.TextBox.init(allocator, text, .{ .border_style = .hidden, .wrap_kind = .none }); │ │295 errdefer count_box.deinit(allocator); │ │296 try box.children.put(allocator, count_box.getFocus().id, .{ .widget = .{ .text_box = count_box }, .rect = null, .min_size = null }); │ │297 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │339 return ui.RoutablePage.repoThreadRemoveRoute(kind, identity, thread_id, comment_id); │ │340 } │ │341 │ │342 -pub fn linkBox(allocator: std.mem.Allocator, session: *ui.Session, text: []const u8, route: ui.RoutablePage) !wgt.TextBox(ui.Widget) { │ │343 - var box = try wgt.TextBox(ui.Widget).init(allocator, text, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none }); │ │342 +pub fn linkBox(allocator: std.mem.Allocator, session: *ui.Session, text: []const u8, route: ui.RoutablePage) !wgt.TextBox { │ │343 + var box = try wgt.TextBox.init(allocator, text, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none }); │ │344 errdefer box.deinit(allocator); │ │345 box.getFocus().focusable = true; │ │346 box.getFocus().kind = .{ .custom = try std.fmt.allocPrint(session.page_arena.allocator(), "a:{s}", .{try route.toUrl(session.page_arena)}) };│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯