mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-02-22 12:58:39 +00:00
It is now possible to add the menubar.
This commit is contained in:
parent
24d8bf382d
commit
42d8bacc6d
@ -28,6 +28,7 @@ Item{
|
|||||||
// GENERAL SETTINGS ///////////////////////////////////////////////////
|
// GENERAL SETTINGS ///////////////////////////////////////////////////
|
||||||
|
|
||||||
property bool fullscreen: false
|
property bool fullscreen: false
|
||||||
|
property bool showMenubar: true
|
||||||
|
|
||||||
property real windowOpacity: 1.0
|
property real windowOpacity: 1.0
|
||||||
property real ambient_light: 0.2
|
property real ambient_light: 0.2
|
||||||
@ -160,6 +161,7 @@ Item{
|
|||||||
fontScalingIndexes: fontScalingIndexes,
|
fontScalingIndexes: fontScalingIndexes,
|
||||||
fontIndexes: fontIndexes,
|
fontIndexes: fontIndexes,
|
||||||
frameReflections: _frameReflections,
|
frameReflections: _frameReflections,
|
||||||
|
showMenubar: showMenubar
|
||||||
}
|
}
|
||||||
return JSON.stringify(settings);
|
return JSON.stringify(settings);
|
||||||
}
|
}
|
||||||
@ -223,6 +225,8 @@ Item{
|
|||||||
fontScalingIndexes = settings.fontScalingIndexes !== undefined ? settings.fontScalingIndexes : fontScalingIndexes
|
fontScalingIndexes = settings.fontScalingIndexes !== undefined ? settings.fontScalingIndexes : fontScalingIndexes
|
||||||
|
|
||||||
_frameReflections = settings.frameReflections !== undefined ? settings.frameReflections : _frameReflections;
|
_frameReflections = settings.frameReflections !== undefined ? settings.frameReflections : _frameReflections;
|
||||||
|
|
||||||
|
showMenubar = settings.showMenubar !== undefined ? settings.showMenubar : showMenubar;
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadProfileString(profileString){
|
function loadProfileString(profileString){
|
||||||
|
@ -122,10 +122,12 @@ Item{
|
|||||||
}
|
}
|
||||||
Menu{
|
Menu{
|
||||||
id: contextmenu
|
id: contextmenu
|
||||||
|
|
||||||
MenuItem{action: copyAction}
|
MenuItem{action: copyAction}
|
||||||
MenuItem{action: pasteAction}
|
MenuItem{action: pasteAction}
|
||||||
MenuSeparator{}
|
MenuSeparator{}
|
||||||
MenuItem{action: fullscreenAction}
|
MenuItem{action: fullscreenAction}
|
||||||
|
MenuItem{action: showMenubarAction}
|
||||||
}
|
}
|
||||||
MouseArea{
|
MouseArea{
|
||||||
acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton
|
acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton
|
||||||
|
16
app/main.qml
16
app/main.qml
@ -40,6 +40,13 @@ ApplicationWindow{
|
|||||||
color: "#00000000"
|
color: "#00000000"
|
||||||
title: qsTr("cool-old-term")
|
title: qsTr("cool-old-term")
|
||||||
|
|
||||||
|
Action {
|
||||||
|
id: showMenubarAction
|
||||||
|
text: qsTr("Show Menubar")
|
||||||
|
checkable: true
|
||||||
|
checked: shadersettings.showMenubar
|
||||||
|
onTriggered: shadersettings.showMenubar = !shadersettings.showMenubar
|
||||||
|
}
|
||||||
Action {
|
Action {
|
||||||
id: fullscreenAction
|
id: fullscreenAction
|
||||||
text: qsTr("&Fullscreen")
|
text: qsTr("&Fullscreen")
|
||||||
@ -102,12 +109,12 @@ ApplicationWindow{
|
|||||||
id: menubar
|
id: menubar
|
||||||
Menu {
|
Menu {
|
||||||
title: qsTr("File")
|
title: qsTr("File")
|
||||||
visible: shadersettings.fullscreen ? false : true
|
visible: shadersettings.showMenubar
|
||||||
MenuItem {action: quitAction}
|
MenuItem {action: quitAction}
|
||||||
}
|
}
|
||||||
Menu {
|
Menu {
|
||||||
title: qsTr("Edit")
|
title: qsTr("Edit")
|
||||||
visible: shadersettings.fullscreen ? false : true
|
visible: shadersettings.showMenubar
|
||||||
MenuItem {action: copyAction}
|
MenuItem {action: copyAction}
|
||||||
MenuItem {action: pasteAction}
|
MenuItem {action: pasteAction}
|
||||||
MenuSeparator{}
|
MenuSeparator{}
|
||||||
@ -115,15 +122,16 @@ ApplicationWindow{
|
|||||||
}
|
}
|
||||||
Menu{
|
Menu{
|
||||||
title: qsTr("View")
|
title: qsTr("View")
|
||||||
visible: shadersettings.fullscreen ? false : true
|
visible: shadersettings.showMenubar
|
||||||
MenuItem {action: fullscreenAction}
|
MenuItem {action: fullscreenAction}
|
||||||
|
MenuItem {action: showMenubarAction}
|
||||||
MenuSeparator{}
|
MenuSeparator{}
|
||||||
MenuItem {action: zoomIn}
|
MenuItem {action: zoomIn}
|
||||||
MenuItem {action: zoomOut}
|
MenuItem {action: zoomOut}
|
||||||
}
|
}
|
||||||
Menu{
|
Menu{
|
||||||
title: qsTr("Help")
|
title: qsTr("Help")
|
||||||
visible: shadersettings.fullscreen ? false : true
|
visible: shadersettings.showMenubar
|
||||||
MenuItem {action: showAboutAction}
|
MenuItem {action: showAboutAction}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user