mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-11-24 14:35:56 +00:00
Merge daf85dfe7eb9303c423a458f833d59800c9cba60 into f157648d1e51878a10e02a8836c1e15aa8c59cc9
This commit is contained in:
commit
fdbd99d172
@ -100,6 +100,8 @@ QtObject {
|
|||||||
|
|
||||||
property real _margin: 0.5
|
property real _margin: 0.5
|
||||||
property real _frameMargin: 0.5
|
property real _frameMargin: 0.5
|
||||||
|
property bool showFrame: false
|
||||||
|
property string frameColor: "#ffffff"
|
||||||
|
|
||||||
property real margin: Utils.lint(1.0, 20.0, _margin)
|
property real margin: Utils.lint(1.0, 20.0, _margin)
|
||||||
property real frameMargin: Utils.lint(1.0, 50.0, _frameMargin)
|
property real frameMargin: Utils.lint(1.0, 50.0, _frameMargin)
|
||||||
@ -272,6 +274,8 @@ QtObject {
|
|||||||
"margin": _margin,
|
"margin": _margin,
|
||||||
"blinkingCursor": blinkingCursor,
|
"blinkingCursor": blinkingCursor,
|
||||||
"frameMargin": _frameMargin,
|
"frameMargin": _frameMargin,
|
||||||
|
"showFrame": showFrame,
|
||||||
|
"frameColor": frameColor,
|
||||||
}
|
}
|
||||||
return settings
|
return settings
|
||||||
}
|
}
|
||||||
@ -379,6 +383,8 @@ QtObject {
|
|||||||
|
|
||||||
_margin = settings.margin !== undefined ? settings.margin : _margin
|
_margin = settings.margin !== undefined ? settings.margin : _margin
|
||||||
_frameMargin = settings.frameMargin !== undefined ? settings.frameMargin : _frameMargin
|
_frameMargin = settings.frameMargin !== undefined ? settings.frameMargin : _frameMargin
|
||||||
|
showFrame = settings.showFrame !== undefined ? settings.showFrame : showFrame
|
||||||
|
frameColor = settings.frameColor !== undefined ? settings.frameColor : frameColor
|
||||||
|
|
||||||
blinkingCursor = settings.blinkingCursor !== undefined ? settings.blinkingCursor : blinkingCursor
|
blinkingCursor = settings.blinkingCursor !== undefined ? settings.blinkingCursor : blinkingCursor
|
||||||
|
|
||||||
@ -463,7 +469,10 @@ QtObject {
|
|||||||
"windowOpacity": 1,
|
"windowOpacity": 1,
|
||||||
"margin": 0.5,
|
"margin": 0.5,
|
||||||
"blinkingCursor": false,
|
"blinkingCursor": false,
|
||||||
"frameMargin": 0.1
|
"frameMargin": 0.1,
|
||||||
|
"showFrame": true,
|
||||||
|
"frameColor": "#ffffff",
|
||||||
|
"showReflections": true
|
||||||
}'
|
}'
|
||||||
builtin: true
|
builtin: true
|
||||||
}
|
}
|
||||||
@ -492,7 +501,10 @@ QtObject {
|
|||||||
"windowOpacity": 1,
|
"windowOpacity": 1,
|
||||||
"margin": 0.5,
|
"margin": 0.5,
|
||||||
"blinkingCursor": false,
|
"blinkingCursor": false,
|
||||||
"frameMargin": 0.1
|
"frameMargin": 0.1,
|
||||||
|
"showFrame": true,
|
||||||
|
"frameColor": "#ffffff",
|
||||||
|
"showReflections": true
|
||||||
}'
|
}'
|
||||||
builtin: true
|
builtin: true
|
||||||
}
|
}
|
||||||
@ -521,7 +533,10 @@ QtObject {
|
|||||||
"windowOpacity": 1,
|
"windowOpacity": 1,
|
||||||
"margin": 0.5,
|
"margin": 0.5,
|
||||||
"blinkingCursor": false,
|
"blinkingCursor": false,
|
||||||
"frameMargin": 0.1
|
"frameMargin": 0.1,
|
||||||
|
"showFrame": true,
|
||||||
|
"frameColor": "#ffffff",
|
||||||
|
"showReflections": true
|
||||||
}'
|
}'
|
||||||
builtin: true
|
builtin: true
|
||||||
}
|
}
|
||||||
@ -550,7 +565,10 @@ QtObject {
|
|||||||
"windowOpacity": 1,
|
"windowOpacity": 1,
|
||||||
"margin": 0.5,
|
"margin": 0.5,
|
||||||
"blinkingCursor": false,
|
"blinkingCursor": false,
|
||||||
"frameMargin": 0.1
|
"frameMargin": 0.1,
|
||||||
|
"showFrame": true,
|
||||||
|
"frameColor": "#ffffff",
|
||||||
|
"showReflections": true
|
||||||
}'
|
}'
|
||||||
builtin: true
|
builtin: true
|
||||||
}
|
}
|
||||||
@ -579,7 +597,10 @@ QtObject {
|
|||||||
"windowOpacity": 1,
|
"windowOpacity": 1,
|
||||||
"margin": 0.5,
|
"margin": 0.5,
|
||||||
"blinkingCursor": false,
|
"blinkingCursor": false,
|
||||||
"frameMargin": 0.2
|
"frameMargin": 0.2,
|
||||||
|
"showFrame": true,
|
||||||
|
"frameColor": "#ffffff",
|
||||||
|
"showReflections": true
|
||||||
}'
|
}'
|
||||||
builtin: true
|
builtin: true
|
||||||
}
|
}
|
||||||
@ -608,7 +629,10 @@ QtObject {
|
|||||||
"windowOpacity": 1,
|
"windowOpacity": 1,
|
||||||
"margin": 0.5,
|
"margin": 0.5,
|
||||||
"blinkingCursor": false,
|
"blinkingCursor": false,
|
||||||
"frameMargin": 0.5
|
"frameMargin": 0.5,
|
||||||
|
"showFrame": true,
|
||||||
|
"frameColor": "#ffffff",
|
||||||
|
"showReflections": true
|
||||||
}'
|
}'
|
||||||
builtin: true
|
builtin: true
|
||||||
}
|
}
|
||||||
@ -637,7 +661,10 @@ QtObject {
|
|||||||
"windowOpacity": 1,
|
"windowOpacity": 1,
|
||||||
"margin": 0.5,
|
"margin": 0.5,
|
||||||
"blinkingCursor": false,
|
"blinkingCursor": false,
|
||||||
"frameMargin": 0.2
|
"frameMargin": 0.2,
|
||||||
|
"showFrame": true,
|
||||||
|
"frameColor": "#ffffff",
|
||||||
|
"showReflections": true
|
||||||
}'
|
}'
|
||||||
builtin: true
|
builtin: true
|
||||||
}
|
}
|
||||||
@ -666,7 +693,10 @@ QtObject {
|
|||||||
"windowOpacity": 1,
|
"windowOpacity": 1,
|
||||||
"margin": 0.5,
|
"margin": 0.5,
|
||||||
"blinkingCursor": false,
|
"blinkingCursor": false,
|
||||||
"frameMargin": 0.1
|
"frameMargin": 0.1,
|
||||||
|
"showFrame": true,
|
||||||
|
"frameColor": "#ffffff",
|
||||||
|
"showReflections": true
|
||||||
}'
|
}'
|
||||||
builtin: true
|
builtin: true
|
||||||
}
|
}
|
||||||
@ -695,7 +725,10 @@ QtObject {
|
|||||||
"windowOpacity": 0.7,
|
"windowOpacity": 0.7,
|
||||||
"margin": 0.1,
|
"margin": 0.1,
|
||||||
"blinkingCursor": false,
|
"blinkingCursor": false,
|
||||||
"frameMargin": 0
|
"frameMargin": 0,
|
||||||
|
"showFrame": true,
|
||||||
|
"frameColor": "#ffffff",
|
||||||
|
"showReflections": true
|
||||||
}'
|
}'
|
||||||
builtin: true
|
builtin: true
|
||||||
}
|
}
|
||||||
|
|||||||
@ -223,6 +223,12 @@ ColumnLayout {
|
|||||||
value: appSettings.windowOpacity
|
value: appSettings.windowOpacity
|
||||||
visible: !appSettings.isMacOS
|
visible: !appSettings.isMacOS
|
||||||
}
|
}
|
||||||
|
CheckBox {
|
||||||
|
text: qsTr("Show frame")
|
||||||
|
checked: appSettings.showFrame
|
||||||
|
onCheckedChanged: appSettings.showFrame = checked
|
||||||
|
Layout.columnSpan: 2
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -166,6 +166,13 @@ ColumnLayout {
|
|||||||
onColorSelected: appSettings._backgroundColor = color
|
onColorSelected: appSettings._backgroundColor = color
|
||||||
color: appSettings._backgroundColor
|
color: appSettings._backgroundColor
|
||||||
}
|
}
|
||||||
|
ColorButton {
|
||||||
|
name: qsTr("Frame")
|
||||||
|
height: 50
|
||||||
|
Layout.fillWidth: true
|
||||||
|
onColorSelected: appSettings.frameColor = color
|
||||||
|
color: appSettings.frameColor
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,7 +28,7 @@ Window {
|
|||||||
id: settings_window
|
id: settings_window
|
||||||
title: qsTr("Settings")
|
title: qsTr("Settings")
|
||||||
width: 640
|
width: 640
|
||||||
height: 640
|
height: 680
|
||||||
|
|
||||||
property int tabmargins: 15
|
property int tabmargins: 15
|
||||||
|
|
||||||
|
|||||||
@ -83,7 +83,7 @@ Item {
|
|||||||
// We progressively disable rasterization from 4x up to 2x resolution.
|
// We progressively disable rasterization from 4x up to 2x resolution.
|
||||||
property real rasterizationIntensity: Utils.smoothstep(2.0, 4.0, _screenDensity)
|
property real rasterizationIntensity: Utils.smoothstep(2.0, 4.0, _screenDensity)
|
||||||
|
|
||||||
property real displayTerminalFrame: appSettings._frameMargin > 0 || appSettings.screenCurvature > 0
|
property real displayTerminalFrame: appSettings.showFrame
|
||||||
|
|
||||||
property real time: timeManager.time
|
property real time: timeManager.time
|
||||||
property ShaderEffectSource noiseSource: noiseShaderSource
|
property ShaderEffectSource noiseSource: noiseShaderSource
|
||||||
@ -385,6 +385,8 @@ Item {
|
|||||||
|
|
||||||
property real rbgShift: (appSettings.rbgShift / width) * appSettings.totalFontScaling // TODO FILIPPO width here is wrong.
|
property real rbgShift: (appSettings.rbgShift / width) * appSettings.totalFontScaling // TODO FILIPPO width here is wrong.
|
||||||
|
|
||||||
|
property bool showReflections: appSettings.showFrame
|
||||||
|
|
||||||
property int rasterization: appSettings.rasterization
|
property int rasterization: appSettings.rasterization
|
||||||
|
|
||||||
property real screen_brightness: Utils.lint(0.5, 1.5, appSettings.brightness)
|
property real screen_brightness: Utils.lint(0.5, 1.5, appSettings.brightness)
|
||||||
@ -454,8 +456,11 @@ Item {
|
|||||||
|
|
||||||
(screenCurvature !== 0 ? "
|
(screenCurvature !== 0 ? "
|
||||||
float distortion = dot(cc, cc) * screenCurvature;
|
float distortion = dot(cc, cc) * screenCurvature;
|
||||||
vec2 curvatureCoords = (qt_TexCoord0 - cc * (1.0 + distortion) * distortion);
|
vec2 curvatureCoords = (qt_TexCoord0 - cc * (1.0 + distortion) * distortion);" +
|
||||||
vec2 txt_coords = - 2.0 * curvatureCoords + 3.0 * step(vec2(0.0), curvatureCoords) * curvatureCoords - 3.0 * step(vec2(1.0), curvatureCoords) * curvatureCoords;"
|
(showReflections ? "
|
||||||
|
vec2 txt_coords = - 2.0 * curvatureCoords + 3.0 * step(vec2(0.0), curvatureCoords) * curvatureCoords - 3.0 * step(vec2(1.0), curvatureCoords) * curvatureCoords;"
|
||||||
|
: "
|
||||||
|
vec2 txt_coords = clamp(curvatureCoords, vec2(0.0), vec2(1.0));")
|
||||||
:"
|
:"
|
||||||
vec2 txt_coords = qt_TexCoord0;") +
|
vec2 txt_coords = qt_TexCoord0;") +
|
||||||
|
|
||||||
@ -473,7 +478,7 @@ Item {
|
|||||||
"txt_color += vec3(0.0001);" +
|
"txt_color += vec3(0.0001);" +
|
||||||
"float greyscale_color = rgb2grey(txt_color);" +
|
"float greyscale_color = rgb2grey(txt_color);" +
|
||||||
|
|
||||||
(screenCurvature !== 0 ? "
|
(screenCurvature !== 0 && showReflections ? "
|
||||||
float reflectionMask = sum2(step(vec2(0.0), curvatureCoords) - step(vec2(1.0), curvatureCoords));
|
float reflectionMask = sum2(step(vec2(0.0), curvatureCoords) - step(vec2(1.0), curvatureCoords));
|
||||||
reflectionMask = clamp(reflectionMask, 0.0, 1.0);"
|
reflectionMask = clamp(reflectionMask, 0.0, 1.0);"
|
||||||
:
|
:
|
||||||
|
|||||||
@ -22,7 +22,7 @@ import QtQuick 2.0
|
|||||||
import "utils.js" as Utils
|
import "utils.js" as Utils
|
||||||
|
|
||||||
ShaderEffect {
|
ShaderEffect {
|
||||||
property color _staticFrameColor: "#fff"
|
property color _staticFrameColor: Utils.strToColor(appSettings.frameColor)
|
||||||
property color _backgroundColor: appSettings.backgroundColor
|
property color _backgroundColor: appSettings.backgroundColor
|
||||||
property color _fontColor: appSettings.fontColor
|
property color _fontColor: appSettings.fontColor
|
||||||
property color _lightColor: Utils.mix(_fontColor, _backgroundColor, 0.2)
|
property color _lightColor: Utils.mix(_fontColor, _backgroundColor, 0.2)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user