Add forward and backward navigation buttons to toolbar

This commit is contained in:
Max Brunsfeld 2022-07-06 14:05:24 -07:00
parent bbe325930f
commit 7e5cf6669f
6 changed files with 80 additions and 9 deletions

View file

@ -168,12 +168,13 @@ pub struct NavigationEntry {
impl Pane {
pub fn new(cx: &mut ViewContext<Self>) -> Self {
let handle = cx.weak_handle();
Self {
items: Vec::new(),
active_item_index: 0,
autoscroll: false,
nav_history: Default::default(),
toolbar: cx.add_view(|_| Toolbar::new()),
toolbar: cx.add_view(|_| Toolbar::new(handle)),
}
}