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