notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit a66b467cb4343fefdb6cd0c799af05d50c94dabf
parent a9a07b38052a6d6ac2915aa4a6eb3948e4553e56
Author: William Casarin <jb55@jb55.com>
Date:   Mon, 24 Jun 2024 16:47:35 -0700

hide navigation title on global nav

Fixes: https://github.com/damus-io/notedeck/issues/109
Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
MCargo.lock | 2+-
MCargo.toml | 2+-
Msrc/ui/global_popup.rs | 20+++++++++++++-------
3 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock @@ -1108,7 +1108,7 @@ dependencies = [ [[package]] name = "egui_nav" version = "0.1.0" -source = "git+https://github.com/damus-io/egui-nav?rev=ef7018a261aa0de13b5074ab3e812ef56e44db09#ef7018a261aa0de13b5074ab3e812ef56e44db09" +source = "git+https://github.com/damus-io/egui-nav?rev=d15bdcedbed93d25f1d45d7b94f35ac25ee0bdc2#d15bdcedbed93d25f1d45d7b94f35ac25ee0bdc2" dependencies = [ "egui", "egui_extras", diff --git a/Cargo.toml b/Cargo.toml @@ -32,7 +32,7 @@ eframe = { version = "0.27.2", default-features = false, features = [ "glow", "w egui_extras = { version = "0.27.2", features = ["all_loaders"] } ehttp = "0.2.0" egui_tabs = { git = "https://github.com/damus-io/egui-tabs", rev = "120971fc43db6ba0b6f194f4bd4a66f7e00a4e22" } -egui_nav = { git = "https://github.com/damus-io/egui-nav", rev = "ef7018a261aa0de13b5074ab3e812ef56e44db09" } +egui_nav = { git = "https://github.com/damus-io/egui-nav", rev = "d15bdcedbed93d25f1d45d7b94f35ac25ee0bdc2" } reqwest = { version = "0.12.4", default-features = false, features = [ "rustls-tls-native-roots" ] } image = { version = "0.24", features = ["jpeg", "png", "webp"] } log = "0.4.17" diff --git a/src/ui/global_popup.rs b/src/ui/global_popup.rs @@ -26,13 +26,19 @@ impl DesktopGlobalPopup { let app_ctx = Rc::new(RefCell::new(app)); let resp = FixedWindow::maybe_with_title(title).show(ui, rect, |ui| { - let nav_response = Nav::new(routes).navigating(false).show(ui, |ui, nav| { - if let Some(resp) = nav.top().show_global_popup(&mut app_ctx.borrow_mut(), ui) { - ui.allocate_rect(resp.rect, Sense::hover()) - } else { - ui.label("") // TODO(kernelkind): not a great practice - } - }); + let nav_response = + Nav::new(routes) + .title(false) + .navigating(false) + .show(ui, |ui, nav| { + if let Some(resp) = + nav.top().show_global_popup(&mut app_ctx.borrow_mut(), ui) + { + ui.allocate_rect(resp.rect, Sense::hover()) + } else { + ui.label("") // TODO(kernelkind): not a great practice + } + }); if let Some(NavAction::Returned) = nav_response.action { app_ctx.borrow_mut().global_nav.pop();