Added fullscreen support

This commit is contained in:
Filippo Scognamiglio 2013-12-30 02:28:30 +01:00
parent 5964677291
commit 63b1fe86a2
2 changed files with 16 additions and 1 deletions

View File

@ -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"

View File

@ -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{