╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭─────────────────────────────────────────────────────────╮ │15 pub const DB = rp.Repo(.xit, canonical_repo_opts).DB;│ │16 │ │17 pub const Home = @import("./ui/Home.zig"); │ │18 +pub const Title = @import("./ui/Title.zig"); │ │19 │ │20 pub const Page = union(enum) { │ │21 home: Home, │ ╰─────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────╮ │196 spacer: Spacer, │ │197 center: Center, │ │198 home: Home.View, │ │199 + title: Title.View, │ │200 home_header: Home.Header.View,│ │201 home_users: Home.Users.View, │ │202 home_repos: Home.Repos.View, │ ╰───────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Home/Header.zig│ ╰──────────────────────╯ ╭─────────────────────────────────────────────────╮ │10 │ │11 pub const AuthTab = @import("./AuthTab.zig");│ │12 │ │13 +title: ui.Title, │ │14 auth_tab: AuthTab, │ │15 │ │16 const Self = @This(); │ ╰─────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────╮ │17 │ │18 pub fn init() Self { │ │18 - return .{ .auth_tab = AuthTab.init() };│ │19 + return .{ │ │20 + .title = ui.Title.init("haxy"), │ │21 + .auth_tab = AuthTab.init(), │ │22 + }; │ │23 } │ │24 │ │25 pub const View = struct { │ ╰───────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────╮ │36 errdefer box.deinit(allocator); │ │37 │ │38 var tab_ids: [3]usize = undefined; │ │39 + │ │40 + // title sits to the left of the tabs │ │41 + { │ │42 + var title_view = try ui.Title.View.init(allocator, &data.title);│ │43 + errdefer title_view.deinit(allocator); │ │44 + try box.children.put(allocator, title_view.getFocus().id, .{ │ │45 + .widget = .{ .title = title_view }, │ │46 + .rect = null, │ │47 + .min_size = .{ .width = data.title.width, .height = null }, │ │48 + }); │ │49 + } │ │50 + │ │51 + // gap between title and the users tab │ │52 + { │ │53 + var text = wgt.Text(ui.Widget).init(" "); │ │54 + errdefer text.deinit(allocator); │ │55 + try box.children.put(allocator, text.getFocus().id, .{ │ │56 + .widget = .{ .text = text }, │ │57 + .rect = null, │ │58 + .min_size = .{ .width = 1, .height = null }, │ │59 + }); │ │60 + } │ │61 │ │62 // fixed tabs: users, repos │ │63 for ( │ ╰────────────────────────────────────────────────────────────────────────────────╯ ╭ added ─────────╮ │src/ui/Title.zig│ ╰────────────────╯