diff --git a/qml/cool-old-term/ShaderSettings.qml b/qml/cool-old-term/ShaderSettings.qml index df67902..7aa18fa 100644 --- a/qml/cool-old-term/ShaderSettings.qml +++ b/qml/cool-old-term/ShaderSettings.qml @@ -1,11 +1,13 @@ import QtQuick 2.0 Item{ + property real ambient_light: 0.2 + property color background_color: "#000000" - property color font_color: "#66ff66" + property color font_color: "#77ff77" property real noise_strength: 0.1 - property real screen_distortion: 0.15 + property real screen_distortion: 0.20 property real glowing_line_strength: 0.4 //property real faulty_screen_prob: 1.0 } diff --git a/qml/cool-old-term/main.qml b/qml/cool-old-term/main.qml index 3217f2c..69cf8f7 100644 --- a/qml/cool-old-term/main.qml +++ b/qml/cool-old-term/main.qml @@ -25,7 +25,7 @@ ***************************************************************************/ import QtQuick 2.1 -import QtQuick.Window 2.1 +import QtQuick.Window 2.0 import QtQuick.Controls 1.0 import QtGraphicalEffects 1.0 @@ -36,6 +36,15 @@ ApplicationWindow{ title: qsTr("Terminal") + menuBar: MenuBar { + Menu { + title: "File" + MenuItem { text: "Open..." } + MenuItem { text: "Close" } + } + + } + visible: true ShaderSettings{ @@ -50,7 +59,7 @@ ApplicationWindow{ ShaderEffect { id: shadercontainer - anchors.fill: parent + anchors.fill: terminal blending: true z: 2 property color font_color: shadersettings.font_color @@ -99,7 +108,7 @@ ApplicationWindow{ } float getScanlineIntensity(vec2 pos){ - return 0.5 + abs(sin(pos.y * txt_Size.y * 0.6)) * 0.5; + return 0.5 + abs(sin(pos.y * txt_Size.y)) * 0.5; } vec2 distortCoordinates(vec2 coords){ @@ -151,24 +160,36 @@ ApplicationWindow{ color: "black" } + Image{ + id: frame + source: "/home/swordfish/Pictures/frame.png" + anchors.centerIn: parent + width: parent.width * 1.05 + height: parent.height * 1.05 + z: 10 + visible: true + opacity: shadersettings.ambient_light + } + TerminalScreen { id: terminal - width: mainwindow.width - height: mainwindow.height + anchors.centerIn: parent + width: mainwindow.width * 0.95 + height: mainwindow.height * 0.93 visible: false //FIXME: Ugly forced clear terminal at the beginning Component.onCompleted: terminal.screen.sendKey("l", 76, 67108864); } -// RadialGradient{ -// z: 4 -// anchors.fill: terminal -// cached: true -// opacity: 0.3 -// gradient: Gradient{ -// GradientStop{position: 0.0; color: shadersettings.font_color} -// GradientStop{position: 0.7; color: shadersettings.background_color} -// } -// } + RadialGradient{ + z: 4 + anchors.fill: parent + cached: true + opacity: 0.25 + gradient: Gradient{ + GradientStop{position: 0.0; color: shadersettings.font_color} + GradientStop{position: 1.0; color: shadersettings.background_color} + } + } } diff --git a/qml/images/frame.png b/qml/images/frame.png new file mode 100644 index 0000000..f1799d7 Binary files /dev/null and b/qml/images/frame.png differ