added frame around the terminal

This commit is contained in:
Filippo Scognamiglio 2013-11-25 16:46:10 +01:00
parent 69bf0a8e20
commit f73e160a99
3 changed files with 40 additions and 17 deletions

View File

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

View File

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

BIN
qml/images/frame.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB