Align tui and gui menubars.
This commit is contained in:
@@ -18,22 +18,6 @@ MenuBar {
|
||||
ClideMenu {
|
||||
title: qsTr("&File")
|
||||
|
||||
ClideMenuItem {
|
||||
action: Action {
|
||||
id: actionNewProject
|
||||
|
||||
text: qsTr("&New Project...")
|
||||
}
|
||||
}
|
||||
ClideMenuItem {
|
||||
action: Action {
|
||||
id: actionOpen
|
||||
|
||||
text: qsTr("&Open...")
|
||||
}
|
||||
|
||||
onTriggered: FileSystem.setDirectory(FileSystem.filePath)
|
||||
}
|
||||
ClideMenuItem {
|
||||
action: Action {
|
||||
id: actionSave
|
||||
@@ -41,6 +25,13 @@ MenuBar {
|
||||
text: qsTr("&Save")
|
||||
}
|
||||
}
|
||||
ClideMenuItem {
|
||||
action: Action {
|
||||
id: actionReload
|
||||
|
||||
text: qsTr("&Reload")
|
||||
}
|
||||
}
|
||||
MenuSeparator {
|
||||
background: Rectangle {
|
||||
border.color: color
|
||||
@@ -67,37 +58,9 @@ MenuBar {
|
||||
|
||||
ClideMenuItem {
|
||||
action: Action {
|
||||
id: actionUndo
|
||||
id: actionCloseTab
|
||||
|
||||
text: qsTr("&Undo")
|
||||
}
|
||||
}
|
||||
ClideMenuItem {
|
||||
action: Action {
|
||||
id: actionRedo
|
||||
|
||||
text: qsTr("&Redo")
|
||||
}
|
||||
}
|
||||
ClideMenuItem {
|
||||
action: Action {
|
||||
id: actionCut
|
||||
|
||||
text: qsTr("&Cut")
|
||||
}
|
||||
}
|
||||
ClideMenuItem {
|
||||
action: Action {
|
||||
id: actionCopy
|
||||
|
||||
text: qsTr("&Copy")
|
||||
}
|
||||
}
|
||||
ClideMenuItem {
|
||||
action: Action {
|
||||
id: actionPaste
|
||||
|
||||
text: qsTr("&Paste")
|
||||
text: qsTr("&Close Tab")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132,13 +95,6 @@ MenuBar {
|
||||
ClideMenu {
|
||||
title: qsTr("&Help")
|
||||
|
||||
ClideMenuItem {
|
||||
action: Action {
|
||||
id: actionDocumentation
|
||||
|
||||
text: qsTr("&Documentation")
|
||||
}
|
||||
}
|
||||
ClideMenuItem {
|
||||
action: Action {
|
||||
id: actionAbout
|
||||
|
||||
@@ -21,6 +21,7 @@ use strum::{EnumIter, FromRepr, IntoEnumIterator};
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, FromRepr, EnumIter)]
|
||||
enum MenuBarItem {
|
||||
File,
|
||||
Edit,
|
||||
View,
|
||||
Help,
|
||||
}
|
||||
@@ -68,12 +69,14 @@ impl MenuBarItem {
|
||||
MenuBarItem::File => "File",
|
||||
MenuBarItem::View => "View",
|
||||
MenuBarItem::Help => "Help",
|
||||
MenuBarItem::Edit => "Edit",
|
||||
}
|
||||
}
|
||||
|
||||
pub fn options(&self) -> &[MenuBarItemOption] {
|
||||
match self {
|
||||
MenuBarItem::File => &[Save, CloseTab, Reload, Exit],
|
||||
MenuBarItem::File => &[Save, Reload, Exit],
|
||||
MenuBarItem::Edit => &[CloseTab],
|
||||
MenuBarItem::View => &[ShowHideExplorer, ShowHideLogger],
|
||||
MenuBarItem::Help => &[About],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user