From 63b1fe86a2c23b0e2a7690298c2579157de43f78 Mon Sep 17 00:00:00 2001 From: Filippo Scognamiglio Date: Mon, 30 Dec 2013 02:28:30 +0100 Subject: [PATCH] Added fullscreen support --- qml/cool-old-term/ShaderSettings.qml | 2 ++ qml/cool-old-term/TerminalWindow.qml | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/qml/cool-old-term/ShaderSettings.qml b/qml/cool-old-term/ShaderSettings.qml index 9c3cc2c..0840ad2 100644 --- a/qml/cool-old-term/ShaderSettings.qml +++ b/qml/cool-old-term/ShaderSettings.qml @@ -21,6 +21,8 @@ import QtQuick 2.1 Item{ + property bool fullscreen: false + property real ambient_light: 0.2 property string background_color: "#002200" diff --git a/qml/cool-old-term/TerminalWindow.qml b/qml/cool-old-term/TerminalWindow.qml index fdbdc59..0fee5e3 100644 --- a/qml/cool-old-term/TerminalWindow.qml +++ b/qml/cool-old-term/TerminalWindow.qml @@ -31,29 +31,42 @@ ApplicationWindow{ title: qsTr("Terminal") + Action { + id: fullscreenAction + text: "&Fullscreen" + shortcut: "Alt+F11" + onTriggered: shadersettings.fullscreen = !shadersettings.fullscreen; + } + menuBar: MenuBar { id: menubar + Menu { title: qsTr("File") + visible: shadersettings.fullscreen ? false : true MenuItem { text: "Close"; onTriggered: terminalWindow.close()} } Menu { title: qsTr("Edit") + visible: shadersettings.fullscreen ? false : true MenuItem { text: qsTr("Settings") onTriggered: { settingswindow.show(); } } + MenuItem{ + action: fullscreenAction + } } } visible: true + visibility: shadersettings.fullscreen ? Window.FullScreen : Window.Windowed Item{ id: maincontainer anchors.fill: parent - anchors.top: menuBar.bottom clip: true ShaderEffectSource{