feat(context_menu): add a context menu widget as menu tree alternative to the popover widget

This commit is contained in:
Michael Aaron Murphy 2024-04-19 17:12:54 +02:00 committed by Michael Murphy
parent c0b653f506
commit 9ffb87d21f
9 changed files with 465 additions and 37 deletions

View file

@ -45,7 +45,7 @@ pub use self::settings::Settings;
use crate::config::CosmicTk;
use crate::prelude::*;
use crate::theme::THEME;
use crate::widget::{context_drawer, nav_bar, popover};
use crate::widget::{context_drawer, menu, nav_bar, popover};
use apply::Apply;
use iced::Subscription;
#[cfg(all(feature = "winit", feature = "multi-window"))]
@ -473,10 +473,7 @@ where
}
/// Shows a context menu for the active nav bar item.
fn nav_context_menu(
&self,
id: nav_bar::Id,
) -> Option<Vec<crate::widget::menu::MenuTree<Message<Self::Message>, crate::Renderer>>> {
fn nav_context_menu(&self, id: nav_bar::Id) -> Option<Vec<menu::Tree<Message<Self::Message>>>> {
None
}