parent
8d5ccdbd25
commit
8cd1b05987
1 changed files with 19 additions and 19 deletions
|
|
@ -1931,27 +1931,27 @@ fn doc_tab_context_menu(
|
||||||
item
|
item
|
||||||
};
|
};
|
||||||
|
|
||||||
let native_path_actions = cfg!(not(target_arch = "wasm32")) && has_current_path;
|
let mut menu = column![
|
||||||
container(
|
|
||||||
column![
|
|
||||||
item("Save All", Some(Message::DocTabSaveAll)),
|
item("Save All", Some(Message::DocTabSaveAll)),
|
||||||
item("Close All", Some(Message::DocTabCloseAll)),
|
item("Close All", Some(Message::DocTabCloseAll)),
|
||||||
item(
|
item(
|
||||||
"Close All Other Drawings",
|
"Close All Other Drawings",
|
||||||
has_other_drawings.then_some(Message::DocTabCloseOthers(tab_idx)),
|
has_other_drawings.then_some(Message::DocTabCloseOthers(tab_idx)),
|
||||||
),
|
),
|
||||||
item(
|
];
|
||||||
|
if cfg!(not(target_arch = "wasm32")) {
|
||||||
|
menu = menu
|
||||||
|
.push(item(
|
||||||
"Copy Full File Path",
|
"Copy Full File Path",
|
||||||
native_path_actions.then_some(Message::DocTabCopyFullPath(tab_idx)),
|
has_current_path.then_some(Message::DocTabCopyFullPath(tab_idx)),
|
||||||
),
|
))
|
||||||
item(
|
.push(item(
|
||||||
"Open File Location",
|
"Open File Location",
|
||||||
native_path_actions.then_some(Message::DocTabOpenFileLocation(tab_idx)),
|
has_current_path.then_some(Message::DocTabOpenFileLocation(tab_idx)),
|
||||||
),
|
));
|
||||||
]
|
}
|
||||||
.spacing(0)
|
|
||||||
.width(MENU_W),
|
container(menu.spacing(0).width(MENU_W))
|
||||||
)
|
|
||||||
.style(container::bordered_box)
|
.style(container::bordered_box)
|
||||||
.padding([4, 0])
|
.padding([4, 0])
|
||||||
.width(iced::Length::Fixed(MENU_W))
|
.width(iced::Length::Fixed(MENU_W))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue