╭ changed ────────╮ │src/ui/widget.zig│ ╰─────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │339 │ │340 return Center.init(allocator, .{ .box = box }); │ │341 } │ │342 + │ │343 +const empty_label = "nothing to see here"; │ │344 │ │345 +// the message a list or tab shows in place of its empty first window │ │346 +pub fn initEmpty(allocator: std.mem.Allocator) !Center { │ │347 + var text_box = try wgt.TextBox.init(allocator, empty_label, .{ .border = null, .wrap_kind = .none });│ │348 + errdefer text_box.deinit(allocator); │ │349 + return Center.init(allocator, .{ .text_box = text_box }); │ │350 +} │ │351 + │ │352 pub const FlowBox = struct { │ │353 focus: *Focus, │ │354 grid: ?Grid, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────╮ │600 │ │601 pub fn getFocus(self: *Scroll) *Focus { │ │602 return self.scroll.getFocus(); │ │594 - } │ │595 - │ │596 - pub fn isEmpty(self: Scroll) bool { │ │597 - return self.scroll.child.flow_box.text_boxes.items.len == 0;│ │603 } │ │604 │ │605 pub fn atTop(self: Scroll) bool { │ ╰─────────────────────────────────────────────────────────────────────────────╯