feat: use libcosmic's context_menu widget
This commit is contained in:
parent
505ecd18fe
commit
9307793661
4 changed files with 66 additions and 111 deletions
|
|
@ -1,9 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use cosmic::{
|
||||
iced::{Point, advanced::graphics::text::font_system},
|
||||
widget::icon,
|
||||
};
|
||||
use cosmic::{iced::advanced::graphics::text::font_system, widget::icon};
|
||||
use cosmic_files::mime_icon::{FALLBACK_MIME_ICON, mime_for_path, mime_icon};
|
||||
use cosmic_text::{Attrs, Buffer, Cursor, Edit, Selection, Shaping, SyntaxEditor, ViEditor, Wrap};
|
||||
use regex::Regex;
|
||||
|
|
@ -51,7 +48,7 @@ pub struct EditorTab {
|
|||
pub path_opt: Option<PathBuf>,
|
||||
attrs: Attrs<'static>,
|
||||
pub editor: Mutex<ViEditor<'static, 'static>>,
|
||||
pub context_menu: Option<Point>,
|
||||
pub context_menu_open: bool,
|
||||
pub zoom_adj: i8,
|
||||
}
|
||||
|
||||
|
|
@ -75,7 +72,7 @@ impl EditorTab {
|
|||
path_opt: None,
|
||||
attrs,
|
||||
editor: Mutex::new(ViEditor::new(editor)),
|
||||
context_menu: None,
|
||||
context_menu_open: false,
|
||||
zoom_adj,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue