mirror of
				https://github.com/Swordfish90/cool-retro-term.git
				synced 2025-10-31 07:04:20 +00:00 
			
		
		
		
	Added fullscreen support
This commit is contained in:
		| @@ -21,6 +21,8 @@ | |||||||
| import QtQuick 2.1 | import QtQuick 2.1 | ||||||
|  |  | ||||||
| Item{ | Item{ | ||||||
|  |     property bool fullscreen: false | ||||||
|  |  | ||||||
|     property real ambient_light: 0.2 |     property real ambient_light: 0.2 | ||||||
|  |  | ||||||
|     property string background_color: "#002200" |     property string background_color: "#002200" | ||||||
|   | |||||||
| @@ -31,29 +31,42 @@ ApplicationWindow{ | |||||||
|  |  | ||||||
|     title: qsTr("Terminal") |     title: qsTr("Terminal") | ||||||
|  |  | ||||||
|  |     Action { | ||||||
|  |         id: fullscreenAction | ||||||
|  |         text: "&Fullscreen" | ||||||
|  |         shortcut: "Alt+F11" | ||||||
|  |         onTriggered: shadersettings.fullscreen = !shadersettings.fullscreen; | ||||||
|  |     } | ||||||
|  |  | ||||||
|     menuBar: MenuBar { |     menuBar: MenuBar { | ||||||
|         id: menubar |         id: menubar | ||||||
|  |  | ||||||
|         Menu { |         Menu { | ||||||
|             title: qsTr("File") |             title: qsTr("File") | ||||||
|  |             visible: shadersettings.fullscreen ? false : true | ||||||
|             MenuItem { text: "Close"; onTriggered: terminalWindow.close()} |             MenuItem { text: "Close"; onTriggered: terminalWindow.close()} | ||||||
|         } |         } | ||||||
|         Menu { |         Menu { | ||||||
|             title: qsTr("Edit") |             title: qsTr("Edit") | ||||||
|  |             visible: shadersettings.fullscreen ? false : true | ||||||
|             MenuItem { |             MenuItem { | ||||||
|                 text: qsTr("Settings") |                 text: qsTr("Settings") | ||||||
|                 onTriggered: { |                 onTriggered: { | ||||||
|                     settingswindow.show(); |                     settingswindow.show(); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |             MenuItem{ | ||||||
|  |                 action: fullscreenAction | ||||||
|  |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     visible: true |     visible: true | ||||||
|  |     visibility: shadersettings.fullscreen ? Window.FullScreen : Window.Windowed | ||||||
|  |  | ||||||
|     Item{ |     Item{ | ||||||
|         id: maincontainer |         id: maincontainer | ||||||
|         anchors.fill: parent |         anchors.fill: parent | ||||||
|         anchors.top: menuBar.bottom |  | ||||||
|         clip: true |         clip: true | ||||||
|  |  | ||||||
|         ShaderEffectSource{ |         ShaderEffectSource{ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user