╭ changed ────────╮ │src/ui/widget.zig│ ╰─────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │231 self.arena.deinit(); │ │232 } │ │233 │ │234 - // one flow item: its display text plus an optional link. a non-empty `link` │ │235 - // sets the item's focus kind such as `.{ .custom = "a:/user/foo" }`, which │ │236 - // the web renderer turns into an anchor. │ │237 - pub const Item = struct { text: []const u8, link: []const u8 = "" }; │ │234 + // one flow item: its display text plus an optional link and bottom label. a │ │235 + // non-empty `link` sets the item's focus kind such as `.{ .custom = "a:/user/foo" }`, │ │236 + // which the web renderer turns into an anchor. │ │237 + pub const Item = struct { text: []const u8, link: []const u8 = "", bottom_label: []const u8 = "" };│ │238 │ │239 - // the text box copies the item text; links are copied into the arena, so the │ │240 - // caller's slices needn't outlive this call. │ │239 + // the text box copies the item text; links and bottom labels are copied into │ │240 + // the arena, so the caller's slices needn't outlive this call. │ │241 pub fn setItems(self: *FlowBox, allocator: std.mem.Allocator, items: []const Item) !void { │ │242 for (self.text_boxes.items) |*tb| tb.deinit(allocator); │ │243 self.text_boxes.clearAndFree(allocator); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │251 self.focus.child_id = null; │ │252 │ │253 for (items) |item| { │ │254 - var text_box = try wgt.TextBox.init(allocator, item.text, .{ .border_style = .hidden, .round_corners = true, .wrap_kind = .word }); │ │254 + var text_box = try wgt.TextBox.init(allocator, item.text, .{ .border_style = .hidden, .round_corners = true, .wrap_kind = .word, .bottom_label = try aa.dupe(u8, item.bottom_label) });│ │255 errdefer text_box.deinit(allocator); │ │256 text_box.getFocus().mode = .all; │ │257 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯