╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─────────────╮ │src/ui/Home/Header.zig│ ╰──────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────╮ │264 if (inp.moveTab(key, current_tab, self.tab_ids.count())) |new_tab| { │ │265 const tab_id = self.tab_ids.keys()[new_tab]; │ │266 root_focus.setFocus(tab_id); │ │218 - const tab = self.scroll.child.box.children.get(tab_id) orelse return;│ │219 - if (tab.rect) |rect| self.scroll.scrollToRect(rect); │ │267 + const tabs_child = self.tabsChild(); │ │268 + const tabs_rect = tabs_child.rect orelse return; │ │269 + const tab = tabs_child.widget.box.children.get(tab_id) orelse return;│ │270 + var rect = tab.rect orelse return; │ │271 + rect.x += tabs_rect.x; │ │272 + rect.y += tabs_rect.y; │ │273 + self.scroll.scrollToRect(rect); │ │274 } │ │275 } │ │276 │ ╰──────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │291 } │ │292 │ │293 fn currentTabIndex(self: View) ?usize { │ │240 - const child_id = self.scroll.child.box.focus.child_id orelse return null; │ │294 + if (self.scroll.child.box.focus.child_id != self.tabs_id) return null; │ │295 + const child_id = self.tabsChild().widget.box.focus.child_id orelse return null;│ │296 return self.tab_ids.getIndex(child_id); │ │297 + } │ │298 + │ │299 + fn tabsChild(self: *const View) *wgt.Box(ui.Widget).Child { │ │300 + return self.scroll.child.box.children.getPtr(self.tabs_id) orelse unreachable; │ │301 } │ │302 }; │ │303 │ ╰────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Commits.zig│ ╰───────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │449 if (session.data.host_kind == .server) { │ │450 var header_view = try ui.widget.SearchHeader.init(allocator, session, data.location, " search ", "search", data.search, data.search_available); │ │451 errdefer header_view.deinit(allocator); │ │452 - try outer.children.put(allocator, header_view.getFocus().id, .{ .widget = .{ .search_header = header_view }, .rect = null, .min_size = .{ .width = null, .height = 3 } });│ │452 + // a row taller than the header, leaving a blank line beneath it │ │453 + try outer.children.put(allocator, header_view.getFocus().id, .{ .widget = .{ .search_header = header_view }, .rect = null, .min_size = .{ .width = null, .height = 4 } });│ │454 } │ │455 │ │456 var box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .direction = .horiz }); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Repo/Events.zig│ ╰──────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │389 │ │390 var header_view = try Header.View.init(allocator, data, session); │ │391 errdefer header_view.deinit(allocator); │ │392 - try outer.children.put(allocator, header_view.getFocus().id, .{ .widget = .{ .repo_events_header = header_view }, .rect = null, .min_size = .{ .width = null, .height = 3 } });│ │392 + // a row taller than the header, leaving a blank line beneath it │ │393 + try outer.children.put(allocator, header_view.getFocus().id, .{ .widget = .{ .repo_events_header = header_view }, .rect = null, .min_size = .{ .width = null, .height = 4 } });│ │394 │ │395 var content_stack = try wgt.Stack(ui.Widget).init(allocator); │ │396 errdefer content_stack.deinit(allocator); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────────────╮ │src/ui/Repo/Files.zig│ ╰─────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │355 if (session.data.host_kind == .server) { │ │356 var header_view = try ui.widget.SearchHeader.init(allocator, session, data.location, " find file ", "find", data.find, data.find_available); │ │357 errdefer header_view.deinit(allocator); │ │358 - try outer.children.put(allocator, header_view.getFocus().id, .{ .widget = .{ .search_header = header_view }, .rect = null, .min_size = .{ .width = null, .height = 3 } });│ │358 + // a row taller than the header, leaving a blank line beneath it │ │359 + try outer.children.put(allocator, header_view.getFocus().id, .{ .widget = .{ .search_header = header_view }, .rect = null, .min_size = .{ .width = null, .height = 4 } });│ │360 } │ │361 │ │362 var box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .direction = .horiz }); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Repo/Header.zig│ ╰──────────────────────╯ ╭────────────────────────────────────────────────────────────╮ │56 scroll: wgt.Scroll(ui.Widget), │ │57 tab_ids: std.AutoArrayHashMapUnmanaged(usize, void),│ │58 tabs_id: usize, │ │59 + gap_id: usize, │ │60 first_group_width: usize, │ │61 session: *ui.Session, │ │62 │ ╰────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │363 .min_size = null, │ │364 }); │ │365 title_box_owned = true; │ │366 + // a blank row between the title and the tabs, shown only when they wrap │ │367 + const gap_id = blk: { │ │368 + var gap = try wgt.Text.init(allocator, " "); │ │369 + errdefer gap.deinit(allocator); │ │370 + const id = gap.getFocus().id; │ │371 + try box.children.put(allocator, id, .{ .widget = .{ .text = gap }, .rect = null, .min_size = null, .hidden = true });│ │372 + break :blk id; │ │373 + }; │ │374 try box.children.put(allocator, tabs_id, .{ │ │375 .widget = .{ .box = tabs_box }, │ │376 .rect = null, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │383 .scroll = try wgt.Scroll(ui.Widget).init(allocator, .{ .box = box }, .{ .direction = .horiz, .show_bar = false, .web_native = !session.is_terminal }),│ │384 .tab_ids = tab_ids, │ │385 .tabs_id = tabs_id, │ │386 + .gap_id = gap_id, │ │387 .first_group_width = first_group_width, │ │388 .session = session, │ │389 }; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │427 const wrap = if (content_width) |width| self.first_group_width + back_width + tabs_width > width else false;│ │428 box.options.direction = if (wrap) .vert else .horiz; │ │429 tabs_child.min_size = if (wrap) .{ .width = content_width, .height = null } else null; │ │430 + (box.children.getPtr(self.gap_id) orelse unreachable).hidden = !wrap; │ │431 │ │432 var scroll_constraint = constraint; │ │433 scroll_constraint.min_size.width = viewport_width; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ───────────╮ │src/ui/Repo/Undo.zig│ ╰────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │406 const link = try std.fmt.allocPrint(session.page_arena.allocator(), "a:{s}", .{try route.toUrl(session.page_arena)}); │ │407 try addText(allocator, &header, "clear undo history", link, .single); │ │408 header.getFocus().child_id = header.children.keys()[0]; │ │409 - try outer.children.put(allocator, header.getFocus().id, .{ .widget = .{ .box = header }, .rect = null, .min_size = .{ .width = null, .height = 3 } });│ │409 + // a row taller than the header, leaving a blank line beneath it │ │410 + try outer.children.put(allocator, header.getFocus().id, .{ .widget = .{ .box = header }, .rect = null, .min_size = .{ .width = null, .height = 4 } });│ │411 } │ │412 │ │413 if (data.clear) { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯