╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─────────────╮ │src/ui/Home/Header.zig│ ╰──────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │185 t.options.border_style = if (self.getFocus().child_id == id) .single else .hidden; │ │186 } │ │187 } │ │182 - try self.box.build(allocator, constraint, root_focus); │ │188 + var scroll_constraint = constraint; │ │189 + scroll_constraint.min_size.width = constraint.max_size.width orelse constraint.min_size.width;│ │190 + try self.scroll.build(allocator, scroll_constraint, root_focus); │ │191 } │ │192 │ │193 pub fn input(self: *View, allocator: std.mem.Allocator, key: Key, root_focus: *Focus) !void { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────╮ │194 _ = allocator; │ │195 const current_tab = self.currentTabIndex() orelse return; │ │196 if (inp.moveTab(key, current_tab, self.tab_ids.count())) |new_tab| { │ │189 - root_focus.setFocus(self.tab_ids.keys()[new_tab]); │ │197 + const tab_id = self.tab_ids.keys()[new_tab]; │ │198 + root_focus.setFocus(tab_id); │ │199 + const tab = self.scroll.child.box.children.get(tab_id) orelse return;│ │200 + if (tab.rect) |rect| self.scroll.scrollToRect(rect); │ │201 } │ │202 } │ │203 │ ╰──────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────╮ │204 pub fn clearGrid(self: *View) void {│ │194 - self.box.clearGrid(); │ │205 + self.scroll.clearGrid(); │ │206 } │ │207 │ │208 pub fn getGrid(self: View) ?Grid { │ ╰─────────────────────────────────────────────╯ ╭──────────────────────────────────────────────╮ │198 - return self.box.getGrid(); │ │209 + return self.scroll.getGrid(); │ │210 } │ │211 │ │212 pub fn getFocus(self: *View) *Focus {│ ╰──────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────╮ │202 - return self.box.getFocus(); │ │213 + return self.scroll.getFocus(); │ │214 } │ │215 │ │216 pub fn getSelectedIndex(self: View) ?usize {│ ╰─────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────╮ │218 } │ │219 │ │220 fn currentTabIndex(self: View) ?usize { │ │210 - const child_id = self.box.focus.child_id orelse return null; │ │221 + const child_id = self.scroll.child.box.focus.child_id orelse return null;│ │222 return self.tab_ids.getIndex(child_id); │ │223 } │ │224 }; │ ╰──────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Comment.zig│ ╰───────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │158 │ │159 var author = try ui.authorBox(allocator, session.page_arena, entry.author); │ │160 errdefer author.deinit(allocator); │ │161 - try bar.children.put(allocator, author.getFocus().id, .{ .widget = .{ .text_box = author }, .rect = null, .min_size = null, .shrink = true }); │ │161 + try bar.children.put(allocator, author.getFocus().id, .{ .widget = .{ .text_box = author }, .rect = null, .min_size = null, .flex = .shrink }); │ │162 │ │163 var reply = try linkBox(allocator, session, "new reply", commentNewRoute(thread_kind, identity, &entry.comment.event.thread_id, &entry.id) orelse return error.RouteTooLong);│ │164 errdefer reply.deinit(allocator); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Commits.zig│ ╰───────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1039 │ │1040 var text_box = try wgt.TextBox(ui.Widget).init(allocator, data.content, .{ .border_style = .hidden, .wrap_kind = .none }); │ │1041 errdefer text_box.deinit(allocator); │ │1042 - try box.children.put(allocator, text_box.getFocus().id, .{ .widget = .{ .text_box = text_box }, .rect = null, .min_size = null, .shrink = true }); │ │1042 + try box.children.put(allocator, text_box.getFocus().id, .{ .widget = .{ .text_box = text_box }, .rect = null, .min_size = null, .flex = .shrink });│ │1043 │ │1044 return .{ .box = box, .data = data }; │ │1045 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Repo/Events.zig│ ╰──────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │601 if (data.header.sync_status) |status_text| { │ │602 var status = try wgt.TextBox(ui.Widget).init(allocator, status_text, .{ .border_style = .hidden, .wrap_kind = .none }); │ │603 errdefer status.deinit(allocator); │ │604 - try box.children.put(allocator, status.getFocus().id, .{ .widget = .{ .text_box = status }, .rect = null, .min_size = null, .shrink = true }); │ │604 + try box.children.put(allocator, status.getFocus().id, .{ .widget = .{ .text_box = status }, .rect = null, .min_size = null, .flex = .shrink });│ │605 } │ │606 box.getFocus().child_id = tab_ids[@intFromEnum(data.view)]; │ │607 return .{ .box = box, .session = session, .tab_ids = tab_ids, .button_id = button_id }; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────────────╮ │src/ui/Repo/Files.zig│ ╰─────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │331 frame.getFocus().child_id = scroll_frame.getFocus().id; │ │332 // shrink, so the fill scroll yields the nav box's row │ │333 // instead of consuming the frame's whole height. │ │334 - try frame.children.put(allocator, scroll_frame.getFocus().id, .{ .widget = .{ .box = scroll_frame }, .rect = null, .min_size = null, .shrink = true }); │ │334 + try frame.children.put(allocator, scroll_frame.getFocus().id, .{ .widget = .{ .box = scroll_frame }, .rect = null, .min_size = null, .flex = .shrink });│ │335 } │ │336 break :blk frame; │ │337 }; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯