╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │246 │ │247 pub fn init(allocator: std.mem.Allocator) !SelectableList { │ │248 var self = blk: { │ │249 - var inner_box = try wgt.Box(Widget).init(allocator, .{ .border_style = null, .rounded_corners = true, .direction = .vert });│ │249 + var inner_box = wgt.Box(Widget).init(.{ .border_style = null, .rounded_corners = true, .direction = .vert }); │ │250 errdefer inner_box.deinit(allocator); │ │251 │ │252 var scroll = try wgt.Scroll(Widget).init(allocator, .{ .box = inner_box }, .vert); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │298 errdefer text_box.deinit(allocator); │ │299 text_box.getFocus().focusable = true; │ │300 try inner_box.children.put(allocator, text_box.getFocus().id, .{ .widget = .{ .text_box = text_box }, .rect = null, .min_size = null });│ │301 - try inner_box.getFocus().addChild(text_box.getFocus(), .{ .width = 0, .height = 0 }, 0, 0); │ │301 + try inner_box.getFocus().addChild(allocator, text_box.getFocus(), .{ .width = 0, .height = 0 }, 0, 0); │ │302 } │ │303 │ │304 if (inner_box.children.count() > 0) { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────╮ │409 focus: Focus, │ │410 grid: ?Grid, │ │411 │ │412 - pub fn init(allocator: std.mem.Allocator) Spacer { │ │412 + pub fn init() Spacer { │ │413 return .{ │ │414 - .focus = Focus.init(allocator, .container),│ │414 + .focus = Focus.init(.container), │ │415 .grid = null, │ │416 }; │ │417 } │ ╰────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────╮ │418 │ │419 pub fn deinit(self: *Spacer, allocator: std.mem.Allocator) void {│ │420 - _ = allocator; │ │421 - self.focus.deinit(); │ │420 + self.focus.deinit(allocator); │ │421 if (self.grid) |*grid| { │ │422 grid.deinit(); │ │423 self.grid = null; │ ╰──────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────╮ │470 errdefer allocator.destroy(child); │ │471 child.* = child_widget; │ │472 return .{ │ │474 - .focus = Focus.init(allocator, .container),│ │473 + .focus = Focus.init(.container), │ │474 .grid = null, │ │475 .child = child, │ │476 .direction = direction, │ ╰────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────╮ │478 } │ │479 │ │480 pub fn deinit(self: *Center, allocator: std.mem.Allocator) void {│ │482 - self.focus.deinit(); │ │481 + self.focus.deinit(allocator); │ │482 if (self.grid) |*grid| { │ │483 grid.deinit(); │ │484 self.grid = null; │ ╰──────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │520 var grid = try Grid.init(allocator, .{ .width = width, .height = height }); │ │521 errdefer grid.deinit(); │ │522 try grid.drawGrid(child_grid, offset_x, offset_y); │ │524 - try self.getFocus().addChild(self.child.getFocus(), child_grid.size, offset_x, offset_y); │ │523 + try self.getFocus().addChild(allocator, self.child.getFocus(), child_grid.size, offset_x, offset_y);│ │524 self.getFocus().child_id = self.child.getFocus().id; │ │525 │ │526 self.grid = grid; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯