hide navigation title on global nav
Fixes: https://github.com/damus-io/notedeck/issues/109 Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -1108,7 +1108,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "egui_nav"
|
name = "egui_nav"
|
||||||
version = "0.1.0"
|
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 = [
|
dependencies = [
|
||||||
"egui",
|
"egui",
|
||||||
"egui_extras",
|
"egui_extras",
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ eframe = { version = "0.27.2", default-features = false, features = [ "glow", "w
|
|||||||
egui_extras = { version = "0.27.2", features = ["all_loaders"] }
|
egui_extras = { version = "0.27.2", features = ["all_loaders"] }
|
||||||
ehttp = "0.2.0"
|
ehttp = "0.2.0"
|
||||||
egui_tabs = { git = "https://github.com/damus-io/egui-tabs", rev = "120971fc43db6ba0b6f194f4bd4a66f7e00a4e22" }
|
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" ] }
|
reqwest = { version = "0.12.4", default-features = false, features = [ "rustls-tls-native-roots" ] }
|
||||||
image = { version = "0.24", features = ["jpeg", "png", "webp"] }
|
image = { version = "0.24", features = ["jpeg", "png", "webp"] }
|
||||||
log = "0.4.17"
|
log = "0.4.17"
|
||||||
|
|||||||
@@ -26,13 +26,19 @@ impl DesktopGlobalPopup {
|
|||||||
let app_ctx = Rc::new(RefCell::new(app));
|
let app_ctx = Rc::new(RefCell::new(app));
|
||||||
|
|
||||||
let resp = FixedWindow::maybe_with_title(title).show(ui, rect, |ui| {
|
let resp = FixedWindow::maybe_with_title(title).show(ui, rect, |ui| {
|
||||||
let nav_response = Nav::new(routes).navigating(false).show(ui, |ui, nav| {
|
let nav_response =
|
||||||
if let Some(resp) = nav.top().show_global_popup(&mut app_ctx.borrow_mut(), ui) {
|
Nav::new(routes)
|
||||||
ui.allocate_rect(resp.rect, Sense::hover())
|
.title(false)
|
||||||
} else {
|
.navigating(false)
|
||||||
ui.label("") // TODO(kernelkind): not a great practice
|
.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 {
|
if let Some(NavAction::Returned) = nav_response.action {
|
||||||
app_ctx.borrow_mut().global_nav.pop();
|
app_ctx.borrow_mut().global_nav.pop();
|
||||||
|
|||||||
Reference in New Issue
Block a user