╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ───────────────╮ │src/ui/Repo/Markdown.zig│ ╰────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │131 │ │132 pub fn build(self: *Frame, allocator: std.mem.Allocator, constraint: layout.Constraint, root_focus: *Focus) !void {│ │133 const focused = if (root_focus.grandchild_id) |id| self.markdownView().owns(id) else false; │ │134 - self.box.options.border_style = if (focused) .double else .single; │ │134 + self.box.options.border = if (focused) .double else .single; │ │135 try self.box.build(allocator, constraint, root_focus); │ │136 } │ │137 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │200 │ │201 // a vertical box of `blocks`, with a blank row between them when `gap` │ │202 fn blocksBox(b: Builder, blocks: []const md.Block, gap: bool) anyerror!wgt.Box(ui.Widget) { │ │203 - var box = try wgt.Box(ui.Widget).init(b.allocator, .{ .border_style = null, .direction = .vert, .gap = @intFromBool(gap) });│ │203 + var box = try wgt.Box(ui.Widget).init(b.allocator, .{ .border = null, .direction = .vert, .gap = @intFromBool(gap) }); │ │204 errdefer box.deinit(b.allocator); │ │205 for (blocks) |block| try b.addBlock(&box, block); │ │206 return box; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │216 .paragraph => |inlines| try put(allocator, box, .{ .rich_text = try RichText.init(allocator, try b.runSpans(inlines, .{})) }), │ │217 .code => |lines| { │ │218 const text = try std.mem.join(b.page_arena.allocator(), "\n", lines); │ │219 - try put(allocator, box, .{ .text_box = try wgt.TextBox.init(allocator, text, .{ .border_style = .single, .round_corners = true, .wrap_kind = .char }) });│ │219 + try put(allocator, box, .{ .text_box = try wgt.TextBox.init(allocator, text, .{ .border = .single, .round_corners = true, .wrap_kind = .char }) }); │ │220 }, │ │221 .quote => |blocks| { │ │222 const gutter = gutter: { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │227 try put(allocator, box, .{ .markdown_gutter = gutter }); │ │228 }, │ │229 .list => |list| { │ │230 - var list_box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .direction = .vert });│ │230 + var list_box = try wgt.Box(ui.Widget).init(allocator, .{ .border = null, .direction = .vert }); │ │231 errdefer list_box.deinit(allocator); │ │232 // ordered markers are right-aligned to the widest number │ │233 const number_width = std.fmt.count("{d}", .{list.start + list.items.len -| 1}); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │248 try put(allocator, box, .{ .box = list_box }); │ │249 }, │ │250 // wider than any pane, and clipped to the width │ │251 - .rule => try put(allocator, box, .{ .text_box = try wgt.TextBox.init(allocator, std.mem.asBytes(&@as([512]["─".len]u8, @splat("─".*))), .{ .border_style = null, .wrap_kind = .none, .style = .{ .dim = true } }) }),│ │251 + .rule => try put(allocator, box, .{ .text_box = try wgt.TextBox.init(allocator, std.mem.asBytes(&@as([512]["─".len]u8, @splat("─".*))), .{ .border = null, .wrap_kind = .none, .style = .{ .dim = true } }) }), │ │252 .raw => |lines| { │ │253 const text = try std.mem.join(b.page_arena.allocator(), "\n", lines); │ │254 - try put(allocator, box, .{ .text_box = try wgt.TextBox.init(allocator, text, .{ .border_style = null, .wrap_kind = .none }) }); │ │254 + try put(allocator, box, .{ .text_box = try wgt.TextBox.init(allocator, text, .{ .border = null, .wrap_kind = .none }) }); │ │255 }, │ │256 } │ │257 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │362 var text = try RichText.init(allocator, marked); │ │363 errdefer text.deinit(allocator); │ │364 │ │365 - var font_box = try wgt.TextBox.init(allocator, "", .{ .border_style = null, .wrap_kind = .none });│ │365 + var font_box = try wgt.TextBox.init(allocator, "", .{ .border = null, .wrap_kind = .none }); │ │366 errdefer font_box.deinit(allocator); │ │367 var self: Heading = .{ .focus = focus, .text = text, .font_box = font_box }; │ │368 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Patches.zig│ ╰───────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │24 pub const Kind = enum { fork, branch }; │ │25 │ │26 pub fn init(allocator: std.mem.Allocator, session: *ui.Session, initial: []const u8, initial_kind: Kind) !Source {│ │27 - var box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .direction = .horiz }); │ │27 + var box = try wgt.Box(ui.Widget).init(allocator, .{ .border = null, .direction = .horiz }); │ │28 errdefer box.deinit(allocator); │ │29 const selected: Kind = if (session.data.host_kind == .local) .branch else initial_kind; │ │30 var selectors: std.enums.EnumMap(Kind, usize) = .{}; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │34 .fork => "from a new fork", │ │35 .branch => "from an existing branch", │ │36 }; │ │37 - var selector = try wgt.TextBox.init(allocator, label, .{ .border_style = .single, .round_corners = true, .wrap_kind = .none }); │ │37 + var selector = try wgt.TextBox.init(allocator, label, .{ .border = .single, .round_corners = true, .wrap_kind = .none }); │ │38 errdefer selector.deinit(allocator); │ │39 selector.getFocus().mode = .all; │ │40 try box.children.put(allocator, selector.getFocus().id, .{ .widget = .{ .text_box = selector }, .rect = null, .min_size = .{ .width = label.len + 2, .height = 3 } });│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │41 selectors.put(kind, selector.getFocus().id); │ │42 } │ │43 } │ │44 - var input_box = try wgt.TextInput.init(allocator, .{ .label = " source branch ", .name = "source_branch", .round_corners = true, .visible_width = null, .render_content = session.is_terminal }); │ │44 + var input_box = try wgt.TextInput.init(allocator, .{ .top_label = .{ .text = " source branch " }, .name = "source_branch", .round_corners = true, .visible_width = null, .render_content = session.is_terminal });│ │45 errdefer input_box.deinit(allocator); │ │46 input_box.getFocus().mode = .all; │ │47 try input_box.setContent(allocator, initial); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │92 const selected = self.selectedKind(); │ │93 for (self.box.children.keys(), self.box.children.values()) |id, *child| switch (child.widget) { │ │94 .text_input => child.hidden = selected == .fork, │ │95 - .text_box => |*selector| selector.options.border_style = if (id == self.selectors.get(selected)) .single else .hidden,│ │95 + .text_box => |*selector| selector.options.border = if (id == self.selectors.get(selected)) .single else .hidden, │ │96 else => {}, │ │97 }; │ │98 try self.box.build(allocator, constraint, root_focus); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯