╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──────────╮ │src/ui/Settings.zig│ ╰───────────────────╯ ╭─────────────────────────────────────────────────────╮ │126 - return self.center.getFocus(); │ │121 + return self.focus; │ │122 } │ │123 │ │124 pub fn getSelectedIndex(self: View) ?usize {│ ╰─────────────────────────────────────────────────────╯ ╭ changed ──────╮ │src/ui/User.zig│ ╰───────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │153 try stack.children.put(allocator, list.getFocus().id, .{ .flow_box_scroll = list }); │ │154 } │ │155 │ │156 - { │ │156 + // the header has no settings tab without a login, so keep the │ │157 + // stack's children 1:1 with the tabs by skipping the view too │ │158 + if (session.data.user_id != null) { │ │159 var settings_view = try Settings.View.init(allocator, session); │ │160 errdefer settings_view.deinit(allocator); │ │161 try stack.children.put(allocator, settings_view.getFocus().id, .{ .home_settings = settings_view });│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/User/Header.zig│ ╰──────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │110 }); │ │111 } │ │112 │ │113 - // settings tab │ │114 - { │ │113 + // settings tab. settings are account preferences, so it needs a login. │ │114 + if (session.data.user_id != null) { │ │115 var text_box = try wgt.TextBox(ui.Widget).init(allocator, "settings", .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │116 errdefer text_box.deinit(allocator); │ │117 text_box.getFocus().focusable = true; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────╮ │171 for (self.box.children.keys(), self.box.children.values()) |id, *child| { │ │172 const tb: ?*wgt.TextBox(ui.Widget) = switch (child.widget) { │ │173 .text_box => |*x| x, │ │174 - .auth_tab => |*at| &at.text_box, │ │174 + .auth_tab => |*at| blk: { │ │175 + // the label tracks login state per frame, so the width must too│ │176 + child.min_size = .{ .width = at.minWidth(), .height = null }; │ │177 + break :blk &at.text_box; │ │178 + }, │ │179 else => null, │ │180 }; │ │181 if (tb) |t| { │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ ╭ added ────────────────╮ │src/ui/Unauthorized.zig│ ╰───────────────────────╯