1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2026-02-08 00:32:27 +00:00

Some improvements to default themes and small cleanups.

This commit is contained in:
Filippo Scognamiglio
2026-01-17 13:51:17 +01:00
parent 737d289a19
commit e1fc767431
26 changed files with 47 additions and 48 deletions

View File

@@ -86,7 +86,7 @@ QtObject {
property real horizontalSync: 0.08
property real flickering: 0.1
property real rbgShift: 0.0
property real rgbShift: 0.0
property real _frameShininess: 0.2
property real frameShininess: _frameShininess * 0.5
@@ -188,7 +188,7 @@ QtObject {
"bloom": bloom,
"rasterization": rasterization,
"jitter": jitter,
"rbgShift": rbgShift,
"rgbShift": rgbShift,
"brightness": brightness,
"contrast": contrast,
"ambientLight": ambientLight,
@@ -289,7 +289,7 @@ QtObject {
jitter = settings.jitter !== undefined ? settings.jitter : jitter
rbgShift = settings.rbgShift !== undefined ? settings.rbgShift : rbgShift
rgbShift = settings.rgbShift !== undefined ? settings.rgbShift : rgbShift
ambientLight = settings.ambientLight !== undefined ? settings.ambientLight : ambientLight
contrast = settings.contrast !== undefined ? settings.contrast : contrast
@@ -384,9 +384,9 @@ QtObject {
"horizontalSync": 0.1,
"jitter": 0.2,
"rasterization": 0,
"rbgShift": 0,
"rgbShift": 0,
"saturationColor": 0.2,
"screenCurvature": 0.4,
"screenCurvature": 0.2,
"screenRadius": 0.1,
"staticNoise": 0.1,
"windowOpacity": 1,
@@ -410,7 +410,7 @@ QtObject {
"contrast": 0.8,
"flickering": 0.1,
"fontColor": "#0ccc68",
"fontName": "EXCELSIOR_SCALED",
"fontName": "DEPARTURE_MONO_SCALED",
"fontSource": 0,
"fontWidth": 1,
"lineSpacing": 0.1,
@@ -418,9 +418,9 @@ QtObject {
"horizontalSync": 0.1,
"jitter": 0.2,
"rasterization": 0,
"rbgShift": 0,
"rgbShift": 0,
"saturationColor": 0.0,
"screenCurvature": 0.7,
"screenCurvature": 0.3,
"screenRadius": 0.2,
"staticNoise": 0.1,
"windowOpacity": 1,
@@ -444,7 +444,7 @@ QtObject {
"contrast": 0.8,
"flickering": 0.1,
"fontColor": "#7fb4ff",
"fontName": "COZETTE_SCALED",
"fontName": "BIGBLUE_TERMINAL_SCALED",
"fontSource": 0,
"fontWidth": 1,
"lineSpacing": 0.1,
@@ -452,9 +452,9 @@ QtObject {
"horizontalSync": 0.1,
"jitter": 0.2,
"rasterization": 0,
"rbgShift": 0,
"rgbShift": 0,
"saturationColor": 0.2,
"screenCurvature": 1.0,
"screenCurvature": 0.4,
"screenRadius": 0.1,
"staticNoise": 0.1,
"windowOpacity": 1,
@@ -486,7 +486,7 @@ QtObject {
"horizontalSync": 0.0,
"jitter": 0.0,
"rasterization": 1,
"rbgShift": 0,
"rgbShift": 0,
"saturationColor": 0,
"screenCurvature": 0.5,
"screenRadius": 0.1,
@@ -495,7 +495,7 @@ QtObject {
"margin": 0.3,
"blinkingCursor": false,
"frameSize": 0.5,
"frameColor": "#444444",
"frameColor": "#999999",
"frameShininess": 0.0
}'
builtin: true
@@ -520,15 +520,15 @@ QtObject {
"horizontalSync": 0.2,
"jitter": 0.15,
"rasterization": 1,
"rbgShift": 0.1,
"rgbShift": 0.0,
"saturationColor": 0,
"screenCurvature": 1.0,
"screenCurvature": 0.7,
"screenRadius": 0.3,
"staticNoise": 0.2,
"windowOpacity": 1,
"margin": 0.2,
"blinkingCursor": false,
"frameSize": 0.8,
"frameSize": 0.5,
"frameColor": "#000000",
"frameShininess": 0.6
}'
@@ -554,15 +554,15 @@ QtObject {
"horizontalSync": 0.2,
"jitter": 0.2,
"rasterization": 1,
"rbgShift": 0.1,
"rgbShift": 0.0,
"saturationColor": 0,
"screenCurvature": 1.0,
"screenCurvature": 0.5,
"screenRadius": 0.3,
"staticNoise": 0.2,
"windowOpacity": 1,
"margin": 0.0,
"blinkingCursor": false,
"frameSize": 0.5,
"frameSize": 0.2,
"frameColor": "#ffffff",
"frameShininess": 0.8
}'
@@ -588,9 +588,9 @@ QtObject {
"horizontalSync": 0.0,
"jitter": 0.0,
"rasterization": 1,
"rbgShift": 0.0,
"rgbShift": 0.0,
"saturationColor": 0,
"screenCurvature": 0.3,
"screenCurvature": 0.4,
"screenRadius": 0.2,
"staticNoise": 0.1,
"windowOpacity": 1,
@@ -622,7 +622,7 @@ QtObject {
"horizontalSync": 0.0,
"jitter": 0.0,
"rasterization": 1,
"rbgShift": 0.15,
"rgbShift": 0.1,
"saturationColor": 0,
"screenCurvature": 0.3,
"screenRadius": 0.1,
@@ -637,13 +637,13 @@ QtObject {
builtin: true
}
ListElement {
text: "IBM 3278"
text: "IBM 3278 Reborn"
obj_string: '{
"ambientLight": 0.2,
"backgroundColor": "#000000",
"bloom": 0.2,
"brightness": 0.5,
"burnIn": 0.7,
"burnIn": 0.5,
"chromaColor": 0,
"contrast": 0.8,
"flickering": 0,
@@ -656,7 +656,7 @@ QtObject {
"horizontalSync": 0,
"jitter": 0,
"rasterization": 4,
"rbgShift": 0,
"rgbShift": 0,
"saturationColor": 0,
"screenCurvature": 0,
"screenRadius": 0.0,
@@ -690,7 +690,7 @@ QtObject {
"horizontalSync": 0.0,
"jitter": 0.1,
"rasterization": 4,
"rbgShift": 0.0,
"rgbShift": 0.0,
"saturationColor": 0.6,
"screenCurvature": 0,
"screenRadius": 0.0,
@@ -724,7 +724,7 @@ QtObject {
"horizontalSync": 0.0,
"jitter": 0.0,
"rasterization": 4,
"rbgShift": 0.1,
"rgbShift": 0.0,
"saturationColor": 0.0,
"screenCurvature": 0,
"screenRadius": 0.0,
@@ -758,7 +758,7 @@ QtObject {
"horizontalSync": 0.0,
"jitter": 0.1,
"rasterization": 4,
"rbgShift": 0.1,
"rgbShift": 0.1,
"saturationColor": 0.8,
"screenCurvature": 0,
"screenRadius": 0.0,
@@ -792,7 +792,7 @@ QtObject {
"horizontalSync": 0,
"jitter": 0.0,
"rasterization": 4,
"rbgShift": 0,
"rgbShift": 0,
"saturationColor": 0.0,
"screenCurvature": 0,
"screenRadius": 0.0,
@@ -826,7 +826,7 @@ QtObject {
"horizontalSync": 0.0,
"jitter": 0.0,
"rasterization": 4,
"rbgShift": 0,
"rgbShift": 0,
"saturationColor": 0,
"screenCurvature": 0,
"screenRadius": 0.0,

View File

@@ -83,8 +83,8 @@ ColumnLayout {
}
CheckableSlider {
name: qsTr("RGB Shift")
onNewValue: function(newValue) { appSettings.rbgShift = newValue }
value: appSettings.rbgShift
onNewValue: function(newValue) { appSettings.rgbShift = newValue }
value: appSettings.rgbShift
}
CheckableSlider {
name: qsTr("Frame Shininess")

View File

@@ -36,7 +36,7 @@ Item {
}
function staticFragmentPath() {
var rgbShiftOn = appSettings.rbgShift > 0 ? 1 : 0;
var rgbShiftOn = appSettings.rgbShift > 0 ? 1 : 0;
var bloomOn = appSettings.bloom > 0 ? 1 : 0;
var curvatureOn = (appSettings.screenCurvature > 0 || appSettings.frameSize > 0) ? 1 : 0;
var shineOn = appSettings.frameShininess > 0 ? 1 : 0;
@@ -176,7 +176,7 @@ Item {
property real chromaColor: appSettings.chromaColor;
property real rbgShift: (appSettings.rbgShift / width) * appSettings.totalFontScaling
property real rgbShift: appSettings.rgbShift * (4.0 / width) * appSettings.totalFontScaling
property real screen_brightness: Utils.lint(0.5, 1.5, appSettings.brightness)
property real frameShininess: appSettings.frameShininess

View File

@@ -50,12 +50,6 @@ ApplicationWindow {
sourceComponent: WindowMenu { }
}
Loader {
id: globalMenuLoader
active: appSettings.isMacOS
sourceComponent: OSXMenu { }
}
property real normalizedWindowScale: 1024 / ((0.5 * width + 0.5 * height))
color: "#00000000"

View File

@@ -19,6 +19,8 @@
*******************************************************************************/
import QtQuick 2.2
import "menus"
QtObject {
id: appRoot
@@ -34,7 +36,7 @@ QtObject {
visible: false
}
property AboutDialog aboutWindow: AboutDialog {
property AboutDialog aboutDialog: AboutDialog {
visible: false
}
@@ -44,6 +46,11 @@ QtObject {
property ListModel windowsModel: ListModel { }
property Loader globalMenuLoader: Loader {
active: appSettings.isMacOS
sourceComponent: OSXMenu { }
}
function createWindow() {
var window = windowComponent.createObject(null)
if (!window)
@@ -65,8 +72,6 @@ QtObject {
window.destroy()
if (windowsModel.count === 0) {
settingsWindow.close()
aboutWindow.close()
appSettings.close()
}
}

View File

@@ -29,7 +29,7 @@ layout(std140, binding = 0) uniform ubuf {
vec2 scaleNoiseSize;
float screen_brightness;
float bloom;
float rbgShift;
float rgbShift;
float frameShadowCoeff;
float frameShininess;
vec4 frameColor;

View File

@@ -20,7 +20,7 @@ layout(std140, binding = 0) uniform ubuf {
mat4 qt_Matrix;
float qt_Opacity;
float screenCurvature;
float rbgShift;
float rgbShift;
float frameShininess;
float frameSize;
float screen_brightness;
@@ -59,7 +59,7 @@ void main() {
vec3 txt_color = texture(source, txt_coords).rgb;
#if CRT_RGB_SHIFT == 1
vec2 displacement = vec2(12.0, 0.0) * rbgShift;
vec2 displacement = vec2(rgbShift, 0.0);
vec3 rightColor = texture(source, txt_coords + displacement).rgb;
vec3 leftColor = texture(source, txt_coords - displacement).rgb;
txt_color.r = leftColor.r * 0.10 + rightColor.r * 0.30 + txt_color.r * 0.60;

View File

@@ -7,7 +7,7 @@ layout(std140, binding = 0) uniform ubuf {
mat4 qt_Matrix;
float qt_Opacity;
float screenCurvature;
float rbgShift;
float rgbShift;
float frameShininess;
float frameSize;
float screen_brightness;

Binary file not shown.