mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-01-31 02:01:19 +00:00
Refactored menus into actions
This commit is contained in:
parent
63b1fe86a2
commit
36e755ea70
@ -37,6 +37,17 @@ ApplicationWindow{
|
|||||||
shortcut: "Alt+F11"
|
shortcut: "Alt+F11"
|
||||||
onTriggered: shadersettings.fullscreen = !shadersettings.fullscreen;
|
onTriggered: shadersettings.fullscreen = !shadersettings.fullscreen;
|
||||||
}
|
}
|
||||||
|
Action {
|
||||||
|
id: quitAction
|
||||||
|
text: "&Quit"
|
||||||
|
shortcut: "Ctrl+Q"
|
||||||
|
onTriggered: terminalWindow.close();
|
||||||
|
}
|
||||||
|
Action{
|
||||||
|
id: showsettingsAction
|
||||||
|
text: "&Settings"
|
||||||
|
onTriggered: settingswindow.show();
|
||||||
|
}
|
||||||
|
|
||||||
menuBar: MenuBar {
|
menuBar: MenuBar {
|
||||||
id: menubar
|
id: menubar
|
||||||
@ -44,20 +55,13 @@ ApplicationWindow{
|
|||||||
Menu {
|
Menu {
|
||||||
title: qsTr("File")
|
title: qsTr("File")
|
||||||
visible: shadersettings.fullscreen ? false : true
|
visible: shadersettings.fullscreen ? false : true
|
||||||
MenuItem { text: "Close"; onTriggered: terminalWindow.close()}
|
MenuItem {action: quitAction}
|
||||||
}
|
}
|
||||||
Menu {
|
Menu {
|
||||||
title: qsTr("Edit")
|
title: qsTr("Edit")
|
||||||
visible: shadersettings.fullscreen ? false : true
|
visible: shadersettings.fullscreen ? false : true
|
||||||
MenuItem {
|
MenuItem {action: showsettingsAction}
|
||||||
text: qsTr("Settings")
|
MenuItem {action: fullscreenAction}
|
||||||
onTriggered: {
|
|
||||||
settingswindow.show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MenuItem{
|
|
||||||
action: fullscreenAction
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user