mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-01-18 12:15:27 +00:00
added frame around the terminal
This commit is contained in:
parent
69bf0a8e20
commit
f73e160a99
@ -1,11 +1,13 @@
|
|||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
|
||||||
Item{
|
Item{
|
||||||
|
property real ambient_light: 0.2
|
||||||
|
|
||||||
property color background_color: "#000000"
|
property color background_color: "#000000"
|
||||||
property color font_color: "#66ff66"
|
property color font_color: "#77ff77"
|
||||||
|
|
||||||
property real noise_strength: 0.1
|
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 glowing_line_strength: 0.4
|
||||||
//property real faulty_screen_prob: 1.0
|
//property real faulty_screen_prob: 1.0
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
import QtQuick.Window 2.1
|
import QtQuick.Window 2.0
|
||||||
import QtQuick.Controls 1.0
|
import QtQuick.Controls 1.0
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
|
|
||||||
@ -36,6 +36,15 @@ ApplicationWindow{
|
|||||||
|
|
||||||
title: qsTr("Terminal")
|
title: qsTr("Terminal")
|
||||||
|
|
||||||
|
menuBar: MenuBar {
|
||||||
|
Menu {
|
||||||
|
title: "File"
|
||||||
|
MenuItem { text: "Open..." }
|
||||||
|
MenuItem { text: "Close" }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
visible: true
|
visible: true
|
||||||
|
|
||||||
ShaderSettings{
|
ShaderSettings{
|
||||||
@ -50,7 +59,7 @@ ApplicationWindow{
|
|||||||
|
|
||||||
ShaderEffect {
|
ShaderEffect {
|
||||||
id: shadercontainer
|
id: shadercontainer
|
||||||
anchors.fill: parent
|
anchors.fill: terminal
|
||||||
blending: true
|
blending: true
|
||||||
z: 2
|
z: 2
|
||||||
property color font_color: shadersettings.font_color
|
property color font_color: shadersettings.font_color
|
||||||
@ -99,7 +108,7 @@ ApplicationWindow{
|
|||||||
}
|
}
|
||||||
|
|
||||||
float getScanlineIntensity(vec2 pos){
|
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){
|
vec2 distortCoordinates(vec2 coords){
|
||||||
@ -151,24 +160,36 @@ ApplicationWindow{
|
|||||||
color: "black"
|
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 {
|
TerminalScreen {
|
||||||
id: terminal
|
id: terminal
|
||||||
width: mainwindow.width
|
anchors.centerIn: parent
|
||||||
height: mainwindow.height
|
width: mainwindow.width * 0.95
|
||||||
|
height: mainwindow.height * 0.93
|
||||||
visible: false
|
visible: false
|
||||||
|
|
||||||
//FIXME: Ugly forced clear terminal at the beginning
|
//FIXME: Ugly forced clear terminal at the beginning
|
||||||
Component.onCompleted: terminal.screen.sendKey("l", 76, 67108864);
|
Component.onCompleted: terminal.screen.sendKey("l", 76, 67108864);
|
||||||
}
|
}
|
||||||
|
|
||||||
// RadialGradient{
|
RadialGradient{
|
||||||
// z: 4
|
z: 4
|
||||||
// anchors.fill: terminal
|
anchors.fill: parent
|
||||||
// cached: true
|
cached: true
|
||||||
// opacity: 0.3
|
opacity: 0.25
|
||||||
// gradient: Gradient{
|
gradient: Gradient{
|
||||||
// GradientStop{position: 0.0; color: shadersettings.font_color}
|
GradientStop{position: 0.0; color: shadersettings.font_color}
|
||||||
// GradientStop{position: 0.7; color: shadersettings.background_color}
|
GradientStop{position: 1.0; color: shadersettings.background_color}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
BIN
qml/images/frame.png
Normal file
BIN
qml/images/frame.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 MiB |
Loading…
x
Reference in New Issue
Block a user