╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ───────────────╮ │src/ui/widget/thread.zig│ ╰────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1840 } │ │1841 │ │1842 if (supports_drafts) { │ │1843 - var target = try wgt.TextInput.init(allocator, .{ .label = " target branch ", .name = "target_branch", .visible_width = null, .round_corners = true, .render_content = session.is_terminal }); │ │1843 + var target = try wgt.TextInput.init(allocator, .{ .top_label = .{ .text = " target branch " }, .name = "target_branch", .visible_width = null, .round_corners = true, .render_content = session.is_terminal });│ │1844 errdefer target.deinit(allocator); │ │1845 target.getFocus().mode = .all; │ │1846 const content = if (saved_fields) |saved| saved.target_branch else if (record) |r| r.event.target_branch else data.default_target_branch; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1854 } │ │1855 │ │1856 fn initCommentForm(allocator: std.mem.Allocator, session: *ui.Session, action: []const u8, author: ui.Author, parent_route: ui.RoutablePage, initial_body: ?[]const u8) !wgt.Box(Widget) {│ │1857 - var box = try wgt.Box(Widget).init(allocator, .{ .border_style = null, .direction = .vert }); │ │1857 + var box = try wgt.Box(Widget).init(allocator, .{ .border = null, .direction = .vert }); │ │1858 errdefer box.deinit(allocator); │ │1859 box.getFocus().kind = .{ .custom = action }; │ │1860 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1861 { │ │1862 var parent = try ui.authorBox(allocator, session.page_arena, author); │ │1863 errdefer parent.deinit(allocator); │ │1864 - parent.options.label = " replying to "; │ │1864 + parent.options.top_label.text = " replying to "; │ │1865 parent.getFocus().kind = .{ .custom = try session.page_arena.allocator().print("a:{s}", .{try parent_route.toUrl(session.page_arena)}) }; │ │1866 try box.children.put(allocator, parent.getFocus().id, .{ .widget = .{ .text_box = parent }, .rect = null, .min_size = .{ .width = null, .height = 3 } });│ │1867 box.getFocus().child_id = parent.getFocus().id; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────╮ │1869 │ │1870 { │ │1871 var body = try wgt.TextInput.init(allocator, .{ │ │1872 - .label = " comment (markdown supported) ", │ │1872 + .top_label = .{ .text = " comment (markdown supported) " },│ │1873 .name = "body", │ │1874 .visible_width = null, │ │1875 .round_corners = true, │ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1895 }; │ │1896 │ │1897 fn initConfirmationForm(allocator: std.mem.Allocator, action: []const u8, buttons: []const ConfirmationButton) !Center {│ │1898 - var box = try wgt.Box(Widget).init(allocator, .{ .border_style = null, .round_corners = true, .direction = .vert });│ │1898 + var box = try wgt.Box(Widget).init(allocator, .{ .border = null, .round_corners = true, .direction = .vert }); │ │1899 errdefer box.deinit(allocator); │ │1900 box.getFocus().kind = .{ .custom = action }; │ │1901 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1904 try box.children.put(allocator, prompt.getFocus().id, .{ .widget = .{ .text = prompt }, .rect = null, .min_size = null }); │ │1905 │ │1906 for (buttons, 0..) |options, index| { │ │1907 - var button = try wgt.TextBox.init(allocator, options.label, .{ .border_style = .single, .round_corners = true, .wrap_kind = .none, .bottom_label = options.bottom_label }); │ │1907 + var button = try wgt.TextBox.init(allocator, options.label, .{ .border = .single, .round_corners = true, .wrap_kind = .none, .bottom_label = .{ .text = options.bottom_label } });│ │1908 errdefer button.deinit(allocator); │ │1909 button.getFocus().mode = .all; │ │1910 button.getFocus().kind = .{ .custom = options.action }; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1940 // init only picks the resolve view once it has read the conflict │ │1941 const conflict = if (data.conflict) |*c| c else unreachable; │ │1942 │ │1943 - var box = try wgt.Box(Widget).init(allocator, .{ .border_style = null, .direction = .vert }); │ │1943 + var box = try wgt.Box(Widget).init(allocator, .{ .border = null, .direction = .vert }); │ │1944 errdefer box.deinit(allocator); │ │1945 const route = resolveRoute(data.identity, data.selected_id, data.theirs_picks) orelse return error.RouteTooLong;│ │1946 box.getFocus().kind = .{ .custom = try aa.print("form:{s}", .{try route.toUrl(session.page_arena)}) }; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1976 for (desc.chunks, 0..) |*chunk, chunk_index| { │ │1977 switch (chunk.*) { │ │1978 .same => |text| { │ │1979 - var tb = try wgt.TextBox.init(allocator, text, .{ .border_style = .single, .round_corners = true, .wrap_kind = .word });│ │1979 + var tb = try wgt.TextBox.init(allocator, text, .{ .border = .single, .round_corners = true, .wrap_kind = .word }); │ │1980 errdefer tb.deinit(allocator); │ │1981 tb.getFocus().mode = .all; │ │1982 try box.children.put(allocator, tb.getFocus().id, .{ .widget = .{ .text_box = tb }, .rect = null, .min_size = null }); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1990 .user_name, .email => |name| try aa.print(" {s} by {s} ", .{ verb, name }), │ │1991 .unknown => try aa.print(" {s} by {s} ", .{ verb, if (auto.theirs) @as([]const u8, "them") else "us" }), │ │1992 }; │ │1993 - var tb = try wgt.TextBox.init(allocator, auto.text orelse "(removed)", .{ .border_style = .single, .round_corners = true, .wrap_kind = .word, .label = label }); │ │1993 + var tb = try wgt.TextBox.init(allocator, auto.text orelse "(removed)", .{ .border = .single, .round_corners = true, .wrap_kind = .word, .top_label = .{ .text = label } });│ │1994 errdefer tb.deinit(allocator); │ │1995 tb.getFocus().mode = .all; │ │1996 try box.children.put(allocator, tb.getFocus().id, .{ .widget = .{ .text_box = tb }, .rect = null, .min_size = null }); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2004 const picked_theirs = data.theirsPicked(name); │ │2005 try addVersionRow(allocator, &box, try sideLabel(aa, desc.ours_author, true), hunk.ours orelse "", try useThisLink(session, data, name, false)); │ │2006 try addVersionRow(allocator, &box, try sideLabel(aa, desc.theirs_author, false), hunk.theirs orelse "", try useThisLink(session, data, name, true)); │ │2007 - var resolution_input = try wgt.TextInput.init(allocator, .{ .label = " resolution ", .name = name, .visible_width = null, .round_corners = true, .render_content = session.is_terminal, .multiline = true }); │ │2007 + var resolution_input = try wgt.TextInput.init(allocator, .{ .top_label = .{ .text = " resolution " }, .name = name, .visible_width = null, .round_corners = true, .render_content = session.is_terminal, .multiline = true });│ │2008 errdefer resolution_input.deinit(allocator); │ │2009 resolution_input.getFocus().mode = .all; │ │2010 try resolution_input.setContent(allocator, (if (picked_theirs) hunk.theirs else hunk.ours) orelse ""); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯