╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ────────╮ │src/ui/widget.zig│ ╰─────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1000 pub const min_size: layout.MaybeSize = .{ .width = 20, .height = 3 }; │ │1001 │ │1002 pub fn init(allocator: std.mem.Allocator, session: *ui.Session, label: []const u8, name: []const u8, text_value: ?[]const u8) !SearchBox { │ │1003 - var text_input = try wgt.TextInput.init(allocator, .{ .label = label, .name = name, .round_corners = true, .visible_width = 18, .render_content = session.is_terminal }); │ │1003 + var text_input = try wgt.TextInput.init(allocator, .{ .top_label = .{ .text = label }, .name = name, .round_corners = true, .visible_width = 18, .render_content = session.is_terminal });│ │1004 errdefer text_input.deinit(allocator); │ │1005 text_input.getFocus().mode = .all; │ │1006 if (text_value) |value| try text_input.setContent(allocator, value); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1012 } │ │1013 │ │1014 pub fn build(self: *SearchBox, allocator: std.mem.Allocator, constraint: layout.Constraint, root_focus: *Focus) !void { │ │1015 - self.text_input.options.bottom_label = if (root_focus.grandchild_id == self.getFocus().id) " press enter " else ""; │ │1015 + self.text_input.options.bottom_label.text = if (root_focus.grandchild_id == self.getFocus().id) " press enter " else "";│ │1016 try self.text_input.build(allocator, constraint, root_focus); │ │1017 if (!self.session.is_terminal) { │ │1018 try self.session.text_inputs.put(self.session.arena.allocator(), self.getFocus().id, &self.text_input); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1055 values: []const []const u8, │ │1056 │ │1057 pub fn init(allocator: std.mem.Allocator, session: *ui.Session, name: []const u8, values: []const []const u8, initial: []const u8) !Radio {│ │1058 - var box = try wgt.Box(Widget).init(allocator, .{ .border_style = null, .direction = .horiz }); │ │1058 + var box = try wgt.Box(Widget).init(allocator, .{ .border = null, .direction = .horiz }); │ │1059 errdefer box.deinit(allocator); │ │1060 for (values) |value| { │ │1061 - var option = try wgt.TextBox.init(allocator, value, .{ .border_style = .single, .round_corners = true, .wrap_kind = .none }); │ │1061 + var option = try wgt.TextBox.init(allocator, value, .{ .border = .single, .round_corners = true, .wrap_kind = .none }); │ │1062 errdefer option.deinit(allocator); │ │1063 option.getFocus().mode = .all; │ │1064 option.getFocus().kind = .{ .custom = try session.page_arena.allocator().print(ui.radio_prefix ++ "{s}={s}", .{ name, value }) }; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1082 self.clearGrid(); │ │1083 const selected_id = self.box.getFocus().child_id; │ │1084 for (self.box.children.keys(), self.box.children.values()) |id, *child| { │ │1085 - child.widget.text_box.options.border_style = if (id == selected_id) .single else .hidden;│ │1085 + child.widget.text_box.options.border = if (id == selected_id) .single else .hidden; │ │1086 } │ │1087 try self.box.build(allocator, constraint, root_focus); │ │1088 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1127 text: ?[]const u8, │ │1128 show_input: bool, │ │1129 ) !SearchHeader { │ │1130 - var box = try wgt.Box(Widget).init(allocator, .{ .border_style = null, .direction = .horiz });│ │1130 + var box = try wgt.Box(Widget).init(allocator, .{ .border = null, .direction = .horiz }); │ │1131 errdefer box.deinit(allocator); │ │1132 │ │1133 // the search box only appears where an index can serve it. │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1333 box: wgt.Box(Widget), │ │1334 │ │1335 pub fn init(allocator: std.mem.Allocator, content: []const u8) !SectionLabel { │ │1336 - var box = try wgt.Box(Widget).init(allocator, .{ .border_style = null, .direction = .horiz });│ │1336 + var box = try wgt.Box(Widget).init(allocator, .{ .border = null, .direction = .horiz }); │ │1337 errdefer box.deinit(allocator); │ │1338 │ │1339 { │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1343 } │ │1344 │ │1345 { │ │1346 - var tb = try wgt.TextBox.init(allocator, content, .{ .border_style = .single, .round_corners = true, .wrap_kind = .none });│ │1346 + var tb = try wgt.TextBox.init(allocator, content, .{ .border = .single, .round_corners = true, .wrap_kind = .none }); │ │1347 errdefer tb.deinit(allocator); │ │1348 tb.getFocus().mode = .all; │ │1349 try box.children.put(allocator, tb.getFocus().id, .{ .widget = .{ .text_box = tb }, .rect = null, .min_size = null }); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1391 } │ │1392 │ │1393 pub fn initLabeled(allocator: std.mem.Allocator, label: []const u8) !SubmitButton { │ │1394 - var box = try wgt.Box(Widget).init(allocator, .{ .border_style = null, .direction = .horiz });│ │1394 + var box = try wgt.Box(Widget).init(allocator, .{ .border = null, .direction = .horiz }); │ │1395 errdefer box.deinit(allocator); │ │1396 │ │1397 { │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1401 } │ │1402 │ │1403 { │ │1404 - var button = try wgt.TextBox.init(allocator, label, .{ .border_style = .single, .round_corners = true, .wrap_kind = .none });│ │1404 + var button = try wgt.TextBox.init(allocator, label, .{ .border = .single, .round_corners = true, .wrap_kind = .none }); │ │1405 errdefer button.deinit(allocator); │ │1406 button.getFocus().mode = .all; │ │1407 // the renderer distinguishes plain clickables from buttons that │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1875 const owned_choices = try allocator.dupe(Choice, choices); │ │1876 errdefer allocator.free(owned_choices); │ │1877 │ │1878 - var box = try wgt.Box(Widget).init(allocator, .{ .border_style = null, .direction = .horiz });│ │1878 + var box = try wgt.Box(Widget).init(allocator, .{ .border = null, .direction = .horiz }); │ │1879 errdefer box.deinit(allocator); │ │1880 │ │1881 if (choices.len > 1) for (choices) |choice| { │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯