╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ About.zig ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
98 } 99 100 pub fn getFocus(self: *View) *Focus { 101 return self.frame.getFocus(); 102 } 103 104 pub fn atTop(self: View) bool { 105 return self.frame.children.values()[0].widget.scroll.y <= 0; 106 } 107 108 fn contentScroll(self: *View) *wgt.Scroll(ui.Widget) { 109 return &self.frame.children.values()[0].widget.scroll; 110 } 111 112 fn markdownView(self: *View) *Markdown.View { 113 return &self.contentScroll().child.markdown; 114 } 115 }; 116