╭ changed ───────────╮ │src/ui/Repo/Undo.zig│ ╰────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │396 const fixed_rows = 2; │ │397 │ │398 pub fn init(allocator: std.mem.Allocator, data: *const Self, session: *ui.Session) !View { │ │399 - var outer = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .direction = .vert });│ │399 + var outer = try wgt.Box(ui.Widget).init(allocator, .{ .border = null, .direction = .vert }); │ │400 errdefer outer.deinit(allocator); │ │401 │ │402 // the sub header carries the tab's only action │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │403 { │ │404 - var header = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .direction = .horiz }); │ │404 + var header = try wgt.Box(ui.Widget).init(allocator, .{ .border = null, .direction = .horiz }); │ │405 errdefer header.deinit(allocator); │ │406 const route = ui.RoutablePage.repoUndoClearRoute(data.identity) orelse return error.RouteTooLong; │ │407 const link = try session.page_arena.allocator().print("a:{s}", .{try route.toUrl(session.page_arena)});│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │419 return .{ .box = outer, .data = data, .session = session }; │ │420 } │ │421 │ │422 - var box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .direction = .horiz });│ │422 + var box = try wgt.Box(ui.Widget).init(allocator, .{ .border = null, .direction = .horiz }); │ │423 errdefer box.deinit(allocator); │ │424 { │ │425 var scroll = blk: { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │426 - var rows = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .direction = .vert, .stretch = true });│ │426 + var rows = try wgt.Box(ui.Widget).init(allocator, .{ .border = null, .direction = .vert, .stretch = true }); │ │427 errdefer rows.deinit(allocator); │ │428 for (data.items) |item| { │ │429 try addText(allocator, &rows, item.action, item.link, .hidden); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │430 // a transaction a later undo discarded says so on its border │ │431 - if (item.undone) rows.children.values()[rows.children.count() - 1].widget.text_box.options.bottom_label = "(undone)"; │ │431 + if (item.undone) rows.children.values()[rows.children.count() - 1].widget.text_box.options.bottom_label.text = "(undone)";│ │432 } │ │433 if (data.next) |next| { │ │434 const route = ui.RoutablePage.repoUndoRoute(data.identity, next) orelse return error.RouteTooLong; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │443 } │ │444 { │ │445 var scroll = blk: { │ │446 - var details = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .direction = .vert });│ │446 + var details = try wgt.Box(ui.Widget).init(allocator, .{ .border = null, .direction = .vert }); │ │447 errdefer details.deinit(allocator); │ │448 if (data.items.len > 0) { │ │449 try addText(allocator, &details, "", null, .single); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │464 │ │465 // the same shape the thread views use to confirm a removal │ │466 fn initClearForm(allocator: std.mem.Allocator, data: *const Self, session: *ui.Session) !ui.widget.Center { │ │467 - var box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .round_corners = true, .direction = .vert }); │ │467 + var box = try wgt.Box(ui.Widget).init(allocator, .{ .border = null, .round_corners = true, .direction = .vert }); │ │468 errdefer box.deinit(allocator); │ │469 const route = ui.RoutablePage.repoUndoClearRoute(data.identity) orelse return error.RouteTooLong; │ │470 box.getFocus().kind = .{ .custom = try session.page_arena.allocator().print("form:{s}", .{try route.toUrl(session.page_arena)}) };│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │473 errdefer prompt.deinit(allocator); │ │474 try box.children.put(allocator, prompt.getFocus().id, .{ .widget = .{ .text = prompt }, .rect = null, .min_size = null }); │ │475 │ │476 - var button = try wgt.TextBox.init(allocator, "clear undo history", .{ .border_style = .single, .round_corners = true, .wrap_kind = .none });│ │476 + var button = try wgt.TextBox.init(allocator, "clear undo history", .{ .border = .single, .round_corners = true, .wrap_kind = .none }); │ │477 errdefer button.deinit(allocator); │ │478 button.getFocus().mode = .all; │ │479 button.getFocus().kind = if (data.handle.canUndo()) .{ .custom = "submit" } else .text_box; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │483 return ui.widget.Center.init(allocator, .{ .box = box }); │ │484 } │ │485 │ │486 - fn addText(allocator: std.mem.Allocator, box: *wgt.Box(ui.Widget), text: []const u8, link: ?[]const u8, border: wgt.BorderStyle) !void {│ │487 - var row = try wgt.TextBox.init(allocator, text, .{ .border_style = border, .round_corners = true, .wrap_kind = .word }); │ │486 + fn addText(allocator: std.mem.Allocator, box: *wgt.Box(ui.Widget), text: []const u8, link: ?[]const u8, border: wgt.Border) !void { │ │487 + var row = try wgt.TextBox.init(allocator, text, .{ .border = border, .round_corners = true, .wrap_kind = .word }); │ │488 errdefer row.deinit(allocator); │ │489 row.getFocus().mode = .all; │ │490 if (link) |value| row.getFocus().kind = .{ .custom = value }; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │494 // a labeled row below the timestamp, added as the selected action needs it │ │495 fn addLabeled(allocator: std.mem.Allocator, box: *wgt.Box(ui.Widget), label: []const u8, text: []const u8, link: ?[]const u8) !void {│ │496 try addText(allocator, box, text, link, .single); │ │497 - box.children.values()[box.children.count() - 1].widget.text_box.options.label = label; │ │497 + box.children.values()[box.children.count() - 1].widget.text_box.options.top_label.text = label; │ │498 } │ │499 │ │500 // enter counts only on the focused button; a click counts anywhere on it │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯