╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Comment.zig│ ╰───────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │186 .label = " replying to ", │ │187 }); │ │188 errdefer parent.deinit(allocator); │ │189 - parent.getFocus().focusable = true; │ │189 + parent.getFocus().mode = .all; │ │190 const route = commentsRoute(thread_kind, identity, &entry.comment.event.thread_id, &entry.comment.event.parent_id, 0) orelse return error.RouteTooLong; │ │191 parent.getFocus().kind = .{ .custom = try std.fmt.allocPrint(session.page_arena.allocator(), "a:{s}", .{try route.toUrl(session.page_arena)}) }; │ │192 try bar.children.put(allocator, parent.getFocus().id, .{ .widget = .{ .text_box = parent }, .rect = null, .min_size = .{ .width = @max(parent_text.len, " replying to ".len) + 2, .height = null } });│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │205 const body_text = if (entry.comment.removed) "(removed)" else entry.comment.event.body; │ │206 var body_box = try wgt.TextBox.init(allocator, body_text, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .word });│ │207 errdefer body_box.deinit(allocator); │ │208 - body_box.getFocus().focusable = true; │ │208 + body_box.getFocus().mode = .all; │ │209 try box.children.put(allocator, body_box.getFocus().id, .{ .widget = .{ .text_box = body_box }, .rect = null, .min_size = null }); │ │210 │ │211 var gap = try wgt.Text.init(allocator, ""); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │342 pub fn linkBox(allocator: std.mem.Allocator, session: *ui.Session, text: []const u8, route: ui.RoutablePage) !wgt.TextBox { │ │343 var box = try wgt.TextBox.init(allocator, text, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none }); │ │344 errdefer box.deinit(allocator); │ │345 - box.getFocus().focusable = true; │ │345 + box.getFocus().mode = .all; │ │346 box.getFocus().kind = .{ .custom = try std.fmt.allocPrint(session.page_arena.allocator(), "a:{s}", .{try route.toUrl(session.page_arena)}) };│ │347 return box; │ │348 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────────╮ │src/ui/Repo/Commits.zig│ ╰───────────────────────╯ ╭──────────────────────────────────────────╮ │405 .label = " message ", │ │406 .bottom_label = bottom_label,│ │407 }); │ │408 - tb.getFocus().focusable = true; │ │408 + tb.getFocus().mode = .all; │ │409 return tb; │ │410 } │ │411 │ ╰──────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │491 break :blk frame; │ │492 }; │ │493 errdefer diff_outer.deinit(allocator); │ │494 + diff_outer.getFocus().mode = .mouse; │ │495 try box.children.put(allocator, diff_outer.getFocus().id, .{ .widget = .{ .box = diff_outer }, .rect = null, .min_size = .{ .width = diff_min_width, .height = null } });│ │496 } │ │497 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │512 fn addRow(allocator: std.mem.Allocator, box: *wgt.Box(ui.Widget), label: []const u8, link: []const u8) !void { │ │513 var row = try wgt.TextBox.init(allocator, label, .{ .border_style = .hidden, .rounded_corners = true, .wrap_kind = .word }); │ │514 errdefer row.deinit(allocator); │ │514 - row.getFocus().focusable = true; │ │515 + row.getFocus().mode = .all; │ │516 if (link.len != 0) row.getFocus().kind = .{ .custom = link }; │ │517 try box.children.put(allocator, row.getFocus().id, .{ .widget = .{ .text_box = row }, .rect = null, .min_size = null, .max_size = .{ .width = null, .height = 5 } });│ │518 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │525 const text = try std.mem.join(self.session.page_arena.allocator(), "\n", lines); │ │526 var tb = try wgt.TextBox.init(allocator, text, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │527 errdefer tb.deinit(allocator); │ │527 - tb.getFocus().focusable = true; │ │528 + tb.getFocus().mode = .all; │ │529 try box.children.put(allocator, tb.getFocus().id, .{ .widget = .{ .text_box = tb }, .rect = null, .min_size = null }); │ │530 } │ │531 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │536 const link = try commitsLink(self.session.page_arena, self.data.location, oid, 0, path); │ │537 var tb = try wgt.TextBox.init(allocator, path, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │538 errdefer tb.deinit(allocator); │ │538 - tb.getFocus().focusable = true; │ │539 + tb.getFocus().mode = .all; │ │540 tb.getFocus().kind = .{ .custom = link }; │ │541 try box.children.put(allocator, tb.getFocus().id, .{ .widget = .{ .text_box = tb }, .rect = null, .min_size = null }); │ │542 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │548 const link = try commitsLink(self.session.page_arena, self.data.location, oid, target_start, path); │ │549 var tb = try wgt.TextBox.init(allocator, label, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │550 errdefer tb.deinit(allocator); │ │550 - tb.getFocus().focusable = true; │ │551 + tb.getFocus().mode = .all; │ │552 tb.getFocus().kind = .{ .custom = link }; │ │553 try box.children.put(allocator, tb.getFocus().id, .{ .widget = .{ .text_box = tb }, .rect = null, .min_size = null }); │ │554 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │559 const link = try filesObjectLink(self.session.page_arena, self.data.location, oid); │ │560 var tb = try wgt.TextBox.init(allocator, "view files at this commit", .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │561 errdefer tb.deinit(allocator); │ │561 - tb.getFocus().focusable = true; │ │562 + tb.getFocus().mode = .all; │ │563 tb.getFocus().kind = .{ .custom = link }; │ │564 try box.children.put(allocator, tb.getFocus().id, .{ .widget = .{ .text_box = tb }, .rect = null, .min_size = null }); │ │565 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯