╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─────────────╮ │src/ui/Repo/Header.zig│ ╰──────────────────────╯ ╭─────────────────────────────────────────────╮ │348 pub fn clearGrid(self: *View) void {│ │338 - self.box.clearGrid(); │ │349 + self.scroll.clearGrid(); │ │350 } │ │351 │ │352 pub fn getGrid(self: View) ?Grid { │ ╰─────────────────────────────────────────────╯ ╭──────────────────────────────────────────────╮ │342 - return self.box.getGrid(); │ │353 + return self.scroll.getGrid(); │ │354 } │ │355 │ │356 pub fn getFocus(self: *View) *Focus {│ ╰──────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────╮ │346 - return self.box.getFocus(); │ │357 + return self.scroll.getFocus(); │ │358 } │ │359 │ │360 pub fn getSelectedIndex(self: View) ?usize {│ ╰─────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────╮ │362 } │ │363 │ │364 fn currentTabIndex(self: View) ?usize { │ │354 - const child_id = self.box.focus.child_id orelse return null; │ │365 + const child_id = self.scroll.child.box.focus.child_id orelse return null;│ │366 return self.tab_ids.getIndex(child_id); │ │367 } │ │368 }; │ ╰──────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/User/Header.zig│ ╰──────────────────────╯ ╭────────────────────────────────────────────────────────────╮ │26 } │ │27 │ │28 pub const View = struct { │ │29 - box: wgt.Box(ui.Widget), │ │29 + scroll: wgt.Scroll(ui.Widget), │ │30 data: *const Self, │ │31 tab_ids: std.AutoArrayHashMapUnmanaged(usize, void),│ │32 │ ╰────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────╮ │48 .widget = .{ .title = title_view },│ │49 .rect = null, │ │50 .min_size = null, │ │51 - .shrink = true, │ │51 + .flex = .shrink, │ │52 }); │ │53 } │ │54 │ ╰───────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────╮ │107 .widget = .{ .spacer = spacer },│ │108 .rect = null, │ │109 .min_size = null, │ │110 + .flex = .grow, │ │111 }); │ │112 } │ │113 │ ╰─────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │156 }); │ │157 } │ │158 │ │158 - var self = View{ .box = box, .data = data, .tab_ids = tab_ids }; │ │159 + var self = View{ │ │160 + .scroll = try wgt.Scroll(ui.Widget).init(allocator, .{ .box = box }, .{ .direction = .horiz, .show_bar = false, .web_native = !session.is_terminal }),│ │161 + .data = data, │ │162 + .tab_ids = tab_ids, │ │163 + }; │ │164 self.getFocus().child_id = selected_tab orelse self.tab_ids.keys()[0]; │ │165 return self; │ │166 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────╮ │167 │ │168 pub fn deinit(self: *View, allocator: std.mem.Allocator) void {│ │164 - self.box.deinit(allocator); │ │169 + self.scroll.deinit(allocator); │ │170 self.tab_ids.deinit(allocator); │ │171 } │ │172 │ ╰────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │173 pub fn build(self: *View, allocator: std.mem.Allocator, constraint: layout.Constraint, root_focus: *Focus) !void {│ │174 self.clearGrid(); │ │175 // only the selected tab shows its border │ │171 - for (self.box.children.keys(), self.box.children.values()) |id, *child| { │ │176 + const box = &self.scroll.child.box; │ │177 + for (box.children.keys(), box.children.values()) |id, *child| { │ │178 const tb: ?*wgt.TextBox(ui.Widget) = switch (child.widget) { │ │179 .text_box => |*x| x, │ │180 .auth_tab => |*at| blk: { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯