╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ───────────────╮ │src/ui/widget/thread.zig│ ╰────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │633 } else { │ │634 var title = try wgt.TextBox.init(allocator, entry.record.event.title, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .word, .label = " title " });│ │635 errdefer title.deinit(allocator); │ │636 - title.getFocus().focusable = true; │ │636 + title.getFocus().mode = .all; │ │637 try inner_box.children.put(allocator, title.getFocus().id, .{ .widget = .{ .text_box = title }, .rect = null, .min_size = null }); │ │638 self.title_id = title.getFocus().id; │ │639 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │673 .bottom_label = if (preview_end != null) " click or press enter to see more " else "", │ │674 }); │ │675 errdefer description.deinit(allocator); │ │676 - description.getFocus().focusable = true; │ │676 + description.getFocus().mode = .all; │ │677 if (preview_end != null) { │ │678 const route = ui.RoutablePage.repoThreadDescriptionRoute(kind, self.data.identity, entry.id) orelse return error.RouteTooLong; │ │679 description.getFocus().kind = .{ .custom = try std.fmt.allocPrint(self.session.page_arena.allocator(), "a:{s}", .{try route.toUrl(self.session.page_arena)}) };│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │809 var previous = cur; │ │810 while (previous > 0) { │ │811 previous -= 1; │ │812 - if (!row.children.values()[previous].widget.getFocus().focusable) continue; │ │812 + if (row.children.values()[previous].widget.getFocus().mode != .all) continue;│ │813 root_focus.setFocus(row.children.keys()[previous]); │ │814 return; │ │815 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────╮ │818 .arrow_right => { │ │819 var next = cur + 1; │ │820 while (next < row.children.count()) : (next += 1) { │ │821 - if (!row.children.values()[next].widget.getFocus().focusable) continue; │ │821 + if (row.children.values()[next].widget.getFocus().mode != .all) continue;│ │822 root_focus.setFocus(row.children.keys()[next]); │ │823 return; │ │824 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────╮ │895 const focus = self.inner().getFocus(); │ │896 var chosen: ?usize = null; │ │897 for (focus.children.keys(), focus.children.values()) |id, child| {│ │898 - if (!child.focus.focusable) continue; │ │898 + if (child.focus.mode != .all) continue; │ │899 chosen = id; │ │900 if (!to_end) break; │ │901 } │ ╰───────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────╮ │925 const child = &inner_box.children.values()[child_index]; │ │926 const child_rect = child.rect orelse return false; │ │927 var chosen: ?usize = null; │ │928 - if (child.widget.getFocus().focusable and self.rectVisible(child_rect)) { │ │928 + if (child.widget.getFocus().mode == .all and self.rectVisible(child_rect)) {│ │929 const id = inner_box.children.keys()[child_index]; │ │930 chosen = id; │ │931 if (!last) { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │935 } │ │936 │ │937 for (child.widget.getFocus().children.keys(), child.widget.getFocus().children.values()) |id, focus_child| {│ │938 - if (!focus_child.focus.focusable) continue; │ │938 + if (focus_child.focus.mode != .all) continue; │ │939 const rect: layout.IRect = .{ │ │940 .x = child_rect.x + @as(isize, @intCast(focus_child.rect.x)), │ │941 .y = child_rect.y + @as(isize, @intCast(focus_child.rect.y)), │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────╮ │982 │ │983 fn childFocusable(self: *This, child_index: usize) bool { │ │984 const focus = self.inner().children.values()[child_index].widget.getFocus();│ │985 - if (focus.focusable) return true; │ │985 + if (focus.mode == .all) return true; │ │986 for (focus.children.values()) |item| { │ │987 - if (item.focus.focusable) return true; │ │987 + if (item.focus.mode == .all) return true; │ │988 } │ │989 return false; │ │990 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1587 { │ │1588 var frame = try wgt.Box(Widget).init(allocator, .{ .border_style = .hidden, .direction = .vert });│ │1589 errdefer frame.deinit(allocator); │ │1590 + frame.getFocus().mode = .mouse; │ │1591 var detail_view = try DetailType.init(allocator, data, session, null, .{}); │ │1592 errdefer detail_view.deinit(allocator); │ │1593 frame.getFocus().child_id = detail_view.getFocus().id; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1613 { │ │1614 var title = try wgt.TextInput.init(allocator, .{ .label = " title ", .name = "title", .visible_width = null, .rounded_corners = true, .render_content = session.is_terminal });│ │1615 errdefer title.deinit(allocator); │ │1615 - title.getFocus().focusable = true; │ │1616 + title.getFocus().mode = .all; │ │1617 if (saved_fields) |saved| │ │1618 try title.setContent(allocator, saved.title) │ │1619 else if (record) |r| │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯