mirror of
				https://github.com/Swordfish90/cool-retro-term.git
				synced 2025-10-30 06:34:16 +00:00 
			
		
		
		
	Improvements in menus
This commit is contained in:
		| @@ -50,6 +50,12 @@ Item{ | |||||||
|     function unloadKTerminal(){ |     function unloadKTerminal(){ | ||||||
|         kterminal.active = false; |         kterminal.active = false; | ||||||
|     } |     } | ||||||
|  |     function pasteClipboard(){ | ||||||
|  |         kterminal.item.pasteClipboard(); | ||||||
|  |     } | ||||||
|  |     function copyClipboard(){ | ||||||
|  |         kterminal.item.copyClipboard(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|     Loader{ |     Loader{ | ||||||
|         id: kterminal |         id: kterminal | ||||||
| @@ -85,14 +91,8 @@ Item{ | |||||||
|     } |     } | ||||||
|     Menu{ |     Menu{ | ||||||
|         id: contextmenu |         id: contextmenu | ||||||
|         MenuItem{ |         MenuItem{action: copyAction} | ||||||
|             text: qsTr("Copy") |         MenuItem{action: pasteAction} | ||||||
|             onTriggered: kterminal.item.copyClipboard() |  | ||||||
|         } |  | ||||||
|         MenuItem{ |  | ||||||
|             text: qsTr("Paste") |  | ||||||
|             onTriggered: kterminal.item.pasteClipboard() |  | ||||||
|         } |  | ||||||
|     } |     } | ||||||
|     MouseArea{ |     MouseArea{ | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										25
									
								
								app/main.qml
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								app/main.qml
									
									
									
									
									
								
							| @@ -36,21 +36,33 @@ ApplicationWindow{ | |||||||
|  |  | ||||||
|     Action { |     Action { | ||||||
|         id: fullscreenAction |         id: fullscreenAction | ||||||
|         text: "&Fullscreen" |         text: qsTr("&Fullscreen") | ||||||
|         shortcut: "Alt+F11" |         shortcut: "Alt+F11" | ||||||
|         onTriggered: shadersettings.fullscreen = !shadersettings.fullscreen; |         onTriggered: shadersettings.fullscreen = !shadersettings.fullscreen; | ||||||
|     } |     } | ||||||
|     Action { |     Action { | ||||||
|         id: quitAction |         id: quitAction | ||||||
|         text: "&Quit" |         text: qsTr("&Quit") | ||||||
|         shortcut: "Ctrl+Q" |         shortcut: "Ctrl+Q" | ||||||
|         onTriggered: terminalWindow.close(); |         onTriggered: terminalWindow.close(); | ||||||
|     } |     } | ||||||
|     Action{ |     Action{ | ||||||
|         id: showsettingsAction |         id: showsettingsAction | ||||||
|         text: "&Settings" |         text: qsTr("&Settings") | ||||||
|         onTriggered: settingswindowloader.active = true; |         onTriggered: settingswindowloader.active = true; | ||||||
|     } |     } | ||||||
|  |     Action{ | ||||||
|  |         id: copyAction | ||||||
|  |         text: qsTr("&Copy") | ||||||
|  |         shortcut: "Ctrl+Shift+C" | ||||||
|  |         onTriggered: terminal.copyClipboard() | ||||||
|  |     } | ||||||
|  |     Action{ | ||||||
|  |         id: pasteAction | ||||||
|  |         text: qsTr("&Paste") | ||||||
|  |         shortcut: "Ctrl+Shift+V" | ||||||
|  |         onTriggered: terminal.pasteClipboard() | ||||||
|  |     } | ||||||
|  |  | ||||||
|     menuBar: MenuBar { |     menuBar: MenuBar { | ||||||
|         id: menubar |         id: menubar | ||||||
| @@ -62,7 +74,14 @@ ApplicationWindow{ | |||||||
|         Menu { |         Menu { | ||||||
|             title: qsTr("Edit") |             title: qsTr("Edit") | ||||||
|             visible: shadersettings.fullscreen ? false : true |             visible: shadersettings.fullscreen ? false : true | ||||||
|  |             MenuItem {action: copyAction} | ||||||
|  |             MenuItem {action: pasteAction} | ||||||
|  |             MenuSeparator{} | ||||||
|             MenuItem {action: showsettingsAction} |             MenuItem {action: showsettingsAction} | ||||||
|  |         } | ||||||
|  |         Menu{ | ||||||
|  |             title: qsTr("View") | ||||||
|  |             visible: shadersettings.fullscreen ? false : true | ||||||
|             MenuItem {action: fullscreenAction} |             MenuItem {action: fullscreenAction} | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user