╭ changed ─────────────╮ │src/ui/Repo/Header.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │180 text_box.getFocus().kind = .{ .custom = commits_link }; │ │181 try tab_ids.put(allocator, text_box.getFocus().id, {}); │ │182 if (std.mem.eql(u8, commits_link, current_link)) selected_tab = text_box.getFocus().id; │ │174 - try box.children.put(allocator, text_box.getFocus().id, .{ │ │183 + try tabs_box.children.put(allocator, text_box.getFocus().id, .{ │ │184 .widget = .{ .text_box = text_box }, │ │185 .rect = null, │ │186 .min_size = .{ .width = @max("commits".len, bottom_label_width) + 2, .height = null },│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │195 text_box.getFocus().kind = .{ .custom = refs_link }; │ │196 try tab_ids.put(allocator, text_box.getFocus().id, {}); │ │197 if (std.mem.eql(u8, refs_link, current_link)) selected_tab = text_box.getFocus().id;│ │189 - try box.children.put(allocator, text_box.getFocus().id, .{ │ │198 + try tabs_box.children.put(allocator, text_box.getFocus().id, .{ │ │199 .widget = .{ .text_box = text_box }, │ │200 .rect = null, │ │201 .min_size = .{ .width = "refs".len + 2, .height = null }, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────╮ │210 text_box.getFocus().kind = .{ .custom = issues_link }; │ │211 try tab_ids.put(allocator, text_box.getFocus().id, {}); │ │212 if (std.mem.eql(u8, issues_link, current_link)) selected_tab = text_box.getFocus().id;│ │204 - try box.children.put(allocator, text_box.getFocus().id, .{ │ │213 + try tabs_box.children.put(allocator, text_box.getFocus().id, .{ │ │214 .widget = .{ .text_box = text_box }, │ │215 .rect = null, │ │216 .min_size = .{ .width = "issues".len + 2, .height = null }, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │225 text_box.getFocus().kind = .{ .custom = discussions_link }; │ │226 try tab_ids.put(allocator, text_box.getFocus().id, {}); │ │227 if (std.mem.eql(u8, discussions_link, current_link)) selected_tab = text_box.getFocus().id;│ │219 - try box.children.put(allocator, text_box.getFocus().id, .{ │ │228 + try tabs_box.children.put(allocator, text_box.getFocus().id, .{ │ │229 .widget = .{ .text_box = text_box }, │ │230 .rect = null, │ │231 .min_size = .{ .width = "discussions".len + 2, .height = null }, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────╮ │240 text_box.getFocus().kind = .{ .custom = events_link }; │ │241 try tab_ids.put(allocator, text_box.getFocus().id, {}); │ │242 if (std.mem.eql(u8, events_link, current_link)) selected_tab = text_box.getFocus().id;│ │234 - try box.children.put(allocator, text_box.getFocus().id, .{ │ │243 + try tabs_box.children.put(allocator, text_box.getFocus().id, .{ │ │244 .widget = .{ .text_box = text_box }, │ │245 .rect = null, │ │246 .min_size = .{ .width = "events".len + 2, .height = null }, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────╮ │251 { │ │252 var spacer = try ui.Spacer.init(allocator); │ │253 errdefer spacer.deinit(allocator); │ │245 - try box.children.put(allocator, spacer.getFocus().id, .{ │ │254 + try tabs_box.children.put(allocator, spacer.getFocus().id, .{│ │255 .widget = .{ .spacer = spacer }, │ │256 .rect = null, │ │257 .min_size = null, │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │268 text_box.getFocus().kind = .{ .custom = settings_link }; │ │269 try tab_ids.put(allocator, text_box.getFocus().id, {}); │ │270 if (std.mem.eql(u8, settings_link, current_link)) selected_tab = text_box.getFocus().id;│ │262 - try box.children.put(allocator, text_box.getFocus().id, .{ │ │271 + try tabs_box.children.put(allocator, text_box.getFocus().id, .{ │ │272 .widget = .{ .text_box = text_box }, │ │273 .rect = null, │ │274 .min_size = .{ .width = "settings".len + 2, .height = null }, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │284 auth_tab.text_box.getFocus().kind = .{ .custom = auth_link }; │ │285 try tab_ids.put(allocator, auth_tab.getFocus().id, {}); │ │286 if (std.mem.eql(u8, auth_link, current_link)) selected_tab = auth_tab.getFocus().id;│ │278 - try box.children.put(allocator, auth_tab.getFocus().id, .{ │ │287 + try tabs_box.children.put(allocator, auth_tab.getFocus().id, .{ │ │288 .widget = .{ .auth_tab = auth_tab }, │ │289 .rect = null, │ │290 .min_size = .{ .width = auth_tab.minWidth(), .height = null }, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────╮ │298 text_box.getFocus().focusable = true; │ │299 text_box.getFocus().kind = .{ .custom = ui.Quit.tab_kind }; │ │300 try tab_ids.put(allocator, text_box.getFocus().id, {}); │ │292 - try box.children.put(allocator, text_box.getFocus().id, .{ │ │301 + try tabs_box.children.put(allocator, text_box.getFocus().id, .{│ │302 .widget = .{ .text_box = text_box }, │ │303 .rect = null, │ │304 // the label is a single column; +2 for the border │ ╰────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │306 }); │ │307 } │ │308 │ │300 - var self = View{ │ │309 + tabs_box.getFocus().child_id = selected_tab orelse tab_ids.keys()[0]; │ │310 + const title_id = title_box.getFocus().id; │ │311 + const tabs_id = tabs_box.getFocus().id; │ │312 + try box.children.put(allocator, title_id, .{ │ │313 + .widget = .{ .box = title_box }, │ │314 + .rect = null, │ │315 + .min_size = null, │ │316 + }); │ │317 + title_box_owned = true; │ │318 + try box.children.put(allocator, tabs_id, .{ │ │319 + .widget = .{ .box = tabs_box }, │ │320 + .rect = null, │ │321 + .min_size = null, │ │322 + }); │ │323 + tabs_box_owned = true; │ │324 + box.getFocus().child_id = tabs_id; │ │325 + │ │326 + return .{ │ │327 .scroll = try wgt.Scroll(ui.Widget).init(allocator, .{ .box = box }, .{ .direction = .horiz, .show_bar = false, .web_native = !session.is_terminal }),│ │328 .data = data, │ │329 .tab_ids = tab_ids, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯