Compare commits
	
		
			18 Commits
		
	
	
		
			a683c5ad85
			...
			EricKotato
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					69792c063d | ||
| e3c2e024bb | |||
| 
						 | 
					b69610d7f3 | ||
| 92a768d6f1 | |||
| 
						 | 
					5ecd7d754d | ||
| 
						 | 
					e3161f64f6 | ||
| 
						 | 
					5b0b091ab6 | ||
| 
						 | 
					4fdf28fb79 | ||
| 49213a1cf0 | |||
| e30db231f6 | |||
| 6609c4867f | |||
| 
						 | 
					84c5e8bca6 | ||
| 1a25749315 | |||
| 
						 | 
					3852f5995d | ||
| 9093b7a16e | |||
| afead1c2c0 | |||
| 1b2572f381 | |||
| 
						 | 
					27ca6b3f73 | 
@@ -16,7 +16,7 @@ macx:ICON = icons/crt.icns
 | 
				
			|||||||
RESOURCES += qml/resources.qrc
 | 
					RESOURCES += qml/resources.qrc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#########################################
 | 
					#########################################
 | 
				
			||||||
##              INTALLS
 | 
					##              INSTALLS
 | 
				
			||||||
#########################################
 | 
					#########################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
target.path += /usr/bin/
 | 
					target.path += /usr/bin/
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										20
									
								
								app/main.cpp
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								app/main.cpp
									
									
									
									
									
								
							@@ -49,15 +49,15 @@ int main(int argc, char *argv[])
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if (argc>1 && (!strcmp(argv[1],"-h") || !strcmp(argv[1],"--help"))) {
 | 
					    if (argc>1 && (!strcmp(argv[1],"-h") || !strcmp(argv[1],"--help"))) {
 | 
				
			||||||
        QTextStream cout(stdout, QIODevice::WriteOnly);
 | 
					        QTextStream cout(stdout, QIODevice::WriteOnly);
 | 
				
			||||||
        cout << "Usage: " << argv[0] << " [--default-settings] [--workdir <dir>] [--program <prog>] [-p|--profile <prof>] [--fullscreen] [-h|--help]" << endl;
 | 
					        cout << "Usage: " << argv[0] << " [--default-settings] [--workdir <dir>] [--program <prog>] [-p|--profile <prof>] [--fullscreen] [-h|--help]" << '\n';
 | 
				
			||||||
        cout << "  --default-settings  Run cool-retro-term with the default settings" << endl;
 | 
					        cout << "  --default-settings  Run cool-retro-term with the default settings" << '\n';
 | 
				
			||||||
        cout << "  --workdir <dir>     Change working directory to 'dir'" << endl;
 | 
					        cout << "  --workdir <dir>     Change working directory to 'dir'" << '\n';
 | 
				
			||||||
        cout << "  -e <cmd>            Command to execute. This option will catch all following arguments, so use it as the last option." << endl;
 | 
					        cout << "  -e <cmd>            Command to execute. This option will catch all following arguments, so use it as the last option." << '\n';
 | 
				
			||||||
        cout << "  -T <title>          Set window title to 'title'." << endl;
 | 
					        cout << "  -T <title>          Set window title to 'title'." << '\n';
 | 
				
			||||||
        cout << "  --fullscreen        Run cool-retro-term in fullscreen." << endl;
 | 
					        cout << "  --fullscreen        Run cool-retro-term in fullscreen." << '\n';
 | 
				
			||||||
        cout << "  -p|--profile <prof> Run cool-retro-term with the given profile." << endl;
 | 
					        cout << "  -p|--profile <prof> Run cool-retro-term with the given profile." << '\n';
 | 
				
			||||||
        cout << "  -h|--help           Print this help." << endl;
 | 
					        cout << "  -h|--help           Print this help." << '\n';
 | 
				
			||||||
        cout << "  --verbose           Print additional information such as profiles and settings." << endl;
 | 
					        cout << "  --verbose           Print additional information such as profiles and settings." << '\n';
 | 
				
			||||||
        return 0;
 | 
					        return 0;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if (argc>1 && (!strcmp(argv[1],"-v") || !strcmp(argv[1],"--version"))) {
 | 
					    if (argc>1 && (!strcmp(argv[1],"-v") || !strcmp(argv[1],"--version"))) {
 | 
				
			||||||
        QTextStream cout(stdout, QIODevice::WriteOnly);
 | 
					        QTextStream cout(stdout, QIODevice::WriteOnly);
 | 
				
			||||||
        cout << "cool-retro-term " << appVersion << endl;
 | 
					        cout << "cool-retro-term " << appVersion << '\n';
 | 
				
			||||||
        return 0;
 | 
					        return 0;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -32,7 +32,7 @@ QtObject {
 | 
				
			|||||||
    readonly property real maximumFontScaling: 2.50
 | 
					    readonly property real maximumFontScaling: 2.50
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    readonly property real minBurnInFadeTime: 160
 | 
					    readonly property real minBurnInFadeTime: 160
 | 
				
			||||||
    readonly property real maxBurnInFadeTime: 1600
 | 
					    readonly property real maxBurnInFadeTime: 160000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    property bool isMacOS: Qt.platform.os === "osx"
 | 
					    property bool isMacOS: Qt.platform.os === "osx"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -71,6 +71,7 @@ QtObject {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    property string _backgroundColor: "#000000"
 | 
					    property string _backgroundColor: "#000000"
 | 
				
			||||||
    property string _fontColor: "#ff8100"
 | 
					    property string _fontColor: "#ff8100"
 | 
				
			||||||
 | 
					    property string _frameColor: "#ffffff"
 | 
				
			||||||
    property string saturatedColor: Utils.mix(Utils.strToColor("#FFFFFF"),
 | 
					    property string saturatedColor: Utils.mix(Utils.strToColor("#FFFFFF"),
 | 
				
			||||||
                                              Utils.strToColor(_fontColor),
 | 
					                                              Utils.strToColor(_fontColor),
 | 
				
			||||||
                                              saturationColor * 0.5)
 | 
					                                              saturationColor * 0.5)
 | 
				
			||||||
@@ -81,6 +82,7 @@ QtObject {
 | 
				
			|||||||
                                                  _backgroundColor),
 | 
					                                                  _backgroundColor),
 | 
				
			||||||
                                              Utils.strToColor(saturatedColor),
 | 
					                                              Utils.strToColor(saturatedColor),
 | 
				
			||||||
                                              0.7 + (contrast * 0.3))
 | 
					                                              0.7 + (contrast * 0.3))
 | 
				
			||||||
 | 
					    property color frameColor: Utils.strToColor(_frameColor)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    property real staticNoise: 0.12
 | 
					    property real staticNoise: 0.12
 | 
				
			||||||
    property real screenCurvature: 0.3
 | 
					    property real screenCurvature: 0.3
 | 
				
			||||||
@@ -90,6 +92,7 @@ QtObject {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    property real chromaColor: 0.25
 | 
					    property real chromaColor: 0.25
 | 
				
			||||||
    property real saturationColor: 0.25
 | 
					    property real saturationColor: 0.25
 | 
				
			||||||
 | 
					    property real frameGloss: 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    property real jitter: 0.2
 | 
					    property real jitter: 0.2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -251,11 +254,13 @@ QtObject {
 | 
				
			|||||||
        var settings = {
 | 
					        var settings = {
 | 
				
			||||||
            "backgroundColor": _backgroundColor,
 | 
					            "backgroundColor": _backgroundColor,
 | 
				
			||||||
            "fontColor": _fontColor,
 | 
					            "fontColor": _fontColor,
 | 
				
			||||||
 | 
					            "frameColor": _frameColor,
 | 
				
			||||||
            "flickering": flickering,
 | 
					            "flickering": flickering,
 | 
				
			||||||
            "horizontalSync": horizontalSync,
 | 
					            "horizontalSync": horizontalSync,
 | 
				
			||||||
            "staticNoise": staticNoise,
 | 
					            "staticNoise": staticNoise,
 | 
				
			||||||
            "chromaColor": chromaColor,
 | 
					            "chromaColor": chromaColor,
 | 
				
			||||||
            "saturationColor": saturationColor,
 | 
					            "saturationColor": saturationColor,
 | 
				
			||||||
 | 
					            "frameGloss": frameGloss,
 | 
				
			||||||
            "screenCurvature": screenCurvature,
 | 
					            "screenCurvature": screenCurvature,
 | 
				
			||||||
            "glowingLine": glowingLine,
 | 
					            "glowingLine": glowingLine,
 | 
				
			||||||
            "burnIn": burnIn,
 | 
					            "burnIn": burnIn,
 | 
				
			||||||
@@ -345,6 +350,7 @@ QtObject {
 | 
				
			|||||||
        _backgroundColor = settings.backgroundColor
 | 
					        _backgroundColor = settings.backgroundColor
 | 
				
			||||||
                !== undefined ? settings.backgroundColor : _backgroundColor
 | 
					                !== undefined ? settings.backgroundColor : _backgroundColor
 | 
				
			||||||
        _fontColor = settings.fontColor !== undefined ? settings.fontColor : _fontColor
 | 
					        _fontColor = settings.fontColor !== undefined ? settings.fontColor : _fontColor
 | 
				
			||||||
 | 
					        _frameColor = settings.frameColor !== undefined ? settings.frameColor : _frameColor
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        horizontalSync = settings.horizontalSync
 | 
					        horizontalSync = settings.horizontalSync
 | 
				
			||||||
                !== undefined ? settings.horizontalSync : horizontalSync
 | 
					                !== undefined ? settings.horizontalSync : horizontalSync
 | 
				
			||||||
@@ -353,6 +359,7 @@ QtObject {
 | 
				
			|||||||
        chromaColor = settings.chromaColor !== undefined ? settings.chromaColor : chromaColor
 | 
					        chromaColor = settings.chromaColor !== undefined ? settings.chromaColor : chromaColor
 | 
				
			||||||
        saturationColor = settings.saturationColor
 | 
					        saturationColor = settings.saturationColor
 | 
				
			||||||
                !== undefined ? settings.saturationColor : saturationColor
 | 
					                !== undefined ? settings.saturationColor : saturationColor
 | 
				
			||||||
 | 
					        frameGloss = settings.frameGloss !== undefined ? settings.frameGloss : frameGloss
 | 
				
			||||||
        screenCurvature = settings.screenCurvature
 | 
					        screenCurvature = settings.screenCurvature
 | 
				
			||||||
                !== undefined ? settings.screenCurvature : screenCurvature
 | 
					                !== undefined ? settings.screenCurvature : screenCurvature
 | 
				
			||||||
        glowingLine = settings.glowingLine !== undefined ? settings.glowingLine : glowingLine
 | 
					        glowingLine = settings.glowingLine !== undefined ? settings.glowingLine : glowingLine
 | 
				
			||||||
@@ -459,6 +466,8 @@ QtObject {
 | 
				
			|||||||
                "rbgShift": 0,
 | 
					                "rbgShift": 0,
 | 
				
			||||||
                "saturationColor": 0.2483,
 | 
					                "saturationColor": 0.2483,
 | 
				
			||||||
                "screenCurvature": 0.3,
 | 
					                "screenCurvature": 0.3,
 | 
				
			||||||
 | 
					                "frameColor": "#ffffff",
 | 
				
			||||||
 | 
					                "frameGloss": 0,
 | 
				
			||||||
                "staticNoise": 0.1198,
 | 
					                "staticNoise": 0.1198,
 | 
				
			||||||
                "windowOpacity": 1,
 | 
					                "windowOpacity": 1,
 | 
				
			||||||
                "margin": 0.5,
 | 
					                "margin": 0.5,
 | 
				
			||||||
@@ -488,6 +497,8 @@ QtObject {
 | 
				
			|||||||
                "rbgShift": 0,
 | 
					                "rbgShift": 0,
 | 
				
			||||||
                "saturationColor": 0.0,
 | 
					                "saturationColor": 0.0,
 | 
				
			||||||
                "screenCurvature": 0.3,
 | 
					                "screenCurvature": 0.3,
 | 
				
			||||||
 | 
					                "frameColor": "#ffffff",
 | 
				
			||||||
 | 
					                "frameGloss": 0,
 | 
				
			||||||
                "staticNoise": 0.1198,
 | 
					                "staticNoise": 0.1198,
 | 
				
			||||||
                "windowOpacity": 1,
 | 
					                "windowOpacity": 1,
 | 
				
			||||||
                "margin": 0.5,
 | 
					                "margin": 0.5,
 | 
				
			||||||
@@ -517,6 +528,8 @@ QtObject {
 | 
				
			|||||||
                "rbgShift": 0,
 | 
					                "rbgShift": 0,
 | 
				
			||||||
                "saturationColor": 0.5,
 | 
					                "saturationColor": 0.5,
 | 
				
			||||||
                "screenCurvature": 0.3,
 | 
					                "screenCurvature": 0.3,
 | 
				
			||||||
 | 
					                "frameColor": "#ffffff",
 | 
				
			||||||
 | 
					                "frameGloss": 0,
 | 
				
			||||||
                "staticNoise": 0.15,
 | 
					                "staticNoise": 0.15,
 | 
				
			||||||
                "windowOpacity": 1,
 | 
					                "windowOpacity": 1,
 | 
				
			||||||
                "margin": 0.5,
 | 
					                "margin": 0.5,
 | 
				
			||||||
@@ -546,6 +559,8 @@ QtObject {
 | 
				
			|||||||
                "rbgShift": 0,
 | 
					                "rbgShift": 0,
 | 
				
			||||||
                "saturationColor": 0,
 | 
					                "saturationColor": 0,
 | 
				
			||||||
                "screenCurvature": 0,
 | 
					                "screenCurvature": 0,
 | 
				
			||||||
 | 
					                "frameColor": "#ffffff",
 | 
				
			||||||
 | 
					                "frameGloss": 0,
 | 
				
			||||||
                "staticNoise": 0.15,
 | 
					                "staticNoise": 0.15,
 | 
				
			||||||
                "windowOpacity": 1,
 | 
					                "windowOpacity": 1,
 | 
				
			||||||
                "margin": 0.5,
 | 
					                "margin": 0.5,
 | 
				
			||||||
@@ -575,6 +590,8 @@ QtObject {
 | 
				
			|||||||
                "rbgShift": 0,
 | 
					                "rbgShift": 0,
 | 
				
			||||||
                "saturationColor": 0,
 | 
					                "saturationColor": 0,
 | 
				
			||||||
                "screenCurvature": 0.5,
 | 
					                "screenCurvature": 0.5,
 | 
				
			||||||
 | 
					                "frameColor": "#ffffff",
 | 
				
			||||||
 | 
					                "frameGloss": 0,
 | 
				
			||||||
                "staticNoise": 0.099,
 | 
					                "staticNoise": 0.099,
 | 
				
			||||||
                "windowOpacity": 1,
 | 
					                "windowOpacity": 1,
 | 
				
			||||||
                "margin": 0.5,
 | 
					                "margin": 0.5,
 | 
				
			||||||
@@ -604,6 +621,8 @@ QtObject {
 | 
				
			|||||||
                "rbgShift": 0.2969,
 | 
					                "rbgShift": 0.2969,
 | 
				
			||||||
                "saturationColor": 0,
 | 
					                "saturationColor": 0,
 | 
				
			||||||
                "screenCurvature": 0.5,
 | 
					                "screenCurvature": 0.5,
 | 
				
			||||||
 | 
					                "frameColor": "#ffffff",
 | 
				
			||||||
 | 
					                "frameGloss": 0,
 | 
				
			||||||
                "staticNoise": 0.2969,
 | 
					                "staticNoise": 0.2969,
 | 
				
			||||||
                "windowOpacity": 1,
 | 
					                "windowOpacity": 1,
 | 
				
			||||||
                "margin": 0.5,
 | 
					                "margin": 0.5,
 | 
				
			||||||
@@ -613,7 +632,7 @@ QtObject {
 | 
				
			|||||||
            builtin: true
 | 
					            builtin: true
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        ListElement {
 | 
					        ListElement {
 | 
				
			||||||
            text: "IBM Dos"
 | 
					            text: "IBM DOS"
 | 
				
			||||||
            obj_string: '{
 | 
					            obj_string: '{
 | 
				
			||||||
                "ambientLight": 0.151,
 | 
					                "ambientLight": 0.151,
 | 
				
			||||||
                "backgroundColor": "#000000",
 | 
					                "backgroundColor": "#000000",
 | 
				
			||||||
@@ -633,6 +652,8 @@ QtObject {
 | 
				
			|||||||
                "rbgShift": 0.3524,
 | 
					                "rbgShift": 0.3524,
 | 
				
			||||||
                "saturationColor": 0,
 | 
					                "saturationColor": 0,
 | 
				
			||||||
                "screenCurvature": 0.4,
 | 
					                "screenCurvature": 0.4,
 | 
				
			||||||
 | 
					                "frameColor": "#ffffff",
 | 
				
			||||||
 | 
					                "frameGloss": 0,
 | 
				
			||||||
                "staticNoise": 0.0503,
 | 
					                "staticNoise": 0.0503,
 | 
				
			||||||
                "windowOpacity": 1,
 | 
					                "windowOpacity": 1,
 | 
				
			||||||
                "margin": 0.5,
 | 
					                "margin": 0.5,
 | 
				
			||||||
@@ -662,6 +683,8 @@ QtObject {
 | 
				
			|||||||
                "rbgShift": 0,
 | 
					                "rbgShift": 0,
 | 
				
			||||||
                "saturationColor": 0,
 | 
					                "saturationColor": 0,
 | 
				
			||||||
                "screenCurvature": 0.2,
 | 
					                "screenCurvature": 0.2,
 | 
				
			||||||
 | 
					                "frameColor": "#ffffff",
 | 
				
			||||||
 | 
					                "frameGloss": 0,
 | 
				
			||||||
                "staticNoise": 0,
 | 
					                "staticNoise": 0,
 | 
				
			||||||
                "windowOpacity": 1,
 | 
					                "windowOpacity": 1,
 | 
				
			||||||
                "margin": 0.5,
 | 
					                "margin": 0.5,
 | 
				
			||||||
@@ -691,6 +714,8 @@ QtObject {
 | 
				
			|||||||
                "rbgShift": 0,
 | 
					                "rbgShift": 0,
 | 
				
			||||||
                "saturationColor": 0.4983,
 | 
					                "saturationColor": 0.4983,
 | 
				
			||||||
                "screenCurvature": 0,
 | 
					                "screenCurvature": 0,
 | 
				
			||||||
 | 
					                "frameColor": "#ffffff",
 | 
				
			||||||
 | 
					                "frameGloss": 0,
 | 
				
			||||||
                "staticNoise": 0.0955,
 | 
					                "staticNoise": 0.0955,
 | 
				
			||||||
                "windowOpacity": 0.7,
 | 
					                "windowOpacity": 0.7,
 | 
				
			||||||
                "margin": 0.1,
 | 
					                "margin": 0.1,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,8 +29,8 @@ Loader {
 | 
				
			|||||||
    property real lastUpdate: 0
 | 
					    property real lastUpdate: 0
 | 
				
			||||||
    property real prevLastUpdate: 0
 | 
					    property real prevLastUpdate: 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    property real burnIn: appSettings.burnIn
 | 
					    property real burnIn: appSettings.burnIn;
 | 
				
			||||||
    property real burnInFadeTime: 1 / Utils.lint(_minBurnInFadeTime, _maxBurnInFadeTime, burnIn)
 | 
					    property real burnInFadeTime: (1 / Utils.lint(_minBurnInFadeTime, _maxBurnInFadeTime, burnIn))*64
 | 
				
			||||||
    property real _minBurnInFadeTime: appSettings.minBurnInFadeTime
 | 
					    property real _minBurnInFadeTime: appSettings.minBurnInFadeTime
 | 
				
			||||||
    property real _maxBurnInFadeTime: appSettings.maxBurnInFadeTime
 | 
					    property real _maxBurnInFadeTime: appSettings.maxBurnInFadeTime
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -146,9 +146,8 @@ Loader {
 | 
				
			|||||||
                    float prevMask = accColor.a;
 | 
					                    float prevMask = accColor.a;
 | 
				
			||||||
                    float currMask = rgb2grey(txtColor);
 | 
					                    float currMask = rgb2grey(txtColor);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    highp float blurDecay = clamp((lastUpdate - prevLastUpdate) * burnInTime, 0.0, 1.0);
 | 
					                    highp float blurDecay = clamp(pow(0.5, burnInTime * (lastUpdate - prevLastUpdate)), 0.0, 1.0);
 | 
				
			||||||
                    blurDecay = max(0.0, blurDecay - prevMask);
 | 
					                    vec3 blurColor = accColor.rgb * vec3(blurDecay);
 | 
				
			||||||
                    vec3 blurColor = accColor.rgb - vec3(blurDecay);
 | 
					 | 
				
			||||||
                    vec3 color = max(blurColor, txtColor);
 | 
					                    vec3 color = max(blurColor, txtColor);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    gl_FragColor = vec4(color, currMask);
 | 
					                    gl_FragColor = vec4(color, currMask);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -149,6 +149,11 @@ ColumnLayout {
 | 
				
			|||||||
                    value: appSettings.saturationColor
 | 
					                    value: appSettings.saturationColor
 | 
				
			||||||
                    enabled: appSettings.chromaColor !== 0
 | 
					                    enabled: appSettings.chromaColor !== 0
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					                CheckableSlider {
 | 
				
			||||||
 | 
					                    name: qsTr("Frame Gloss")
 | 
				
			||||||
 | 
					                    onNewValue: appSettings.frameGloss = newValue
 | 
				
			||||||
 | 
					                    value: appSettings.frameGloss
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            RowLayout {
 | 
					            RowLayout {
 | 
				
			||||||
                Layout.fillWidth: true
 | 
					                Layout.fillWidth: true
 | 
				
			||||||
@@ -166,6 +171,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
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -30,6 +30,7 @@ Window {
 | 
				
			|||||||
    width: 640
 | 
					    width: 640
 | 
				
			||||||
    height: 640
 | 
					    height: 640
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    color: palette.window
 | 
				
			||||||
    property int tabmargins: 15
 | 
					    property int tabmargins: 15
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Item {
 | 
					    Item {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -37,6 +37,8 @@ Item {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    property real ambientLight: appSettings.ambientLight * 0.2
 | 
					    property real ambientLight: appSettings.ambientLight * 0.2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    property real frameGloss: appSettings.frameGloss
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    property size virtualResolution
 | 
					    property size virtualResolution
 | 
				
			||||||
    property size screenResolution
 | 
					    property size screenResolution
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -59,6 +61,7 @@ Item {
 | 
				
			|||||||
         property real screenCurvature: parent.screenCurvature
 | 
					         property real screenCurvature: parent.screenCurvature
 | 
				
			||||||
         property real chromaColor: parent.chromaColor
 | 
					         property real chromaColor: parent.chromaColor
 | 
				
			||||||
         property real ambientLight: parent.ambientLight
 | 
					         property real ambientLight: parent.ambientLight
 | 
				
			||||||
 | 
					         property real frameGloss: parent.frameGloss
 | 
				
			||||||
 | 
					
 | 
				
			||||||
         property real flickering: appSettings.flickering
 | 
					         property real flickering: appSettings.flickering
 | 
				
			||||||
         property real horizontalSync: appSettings.horizontalSync
 | 
					         property real horizontalSync: appSettings.horizontalSync
 | 
				
			||||||
@@ -172,6 +175,7 @@ Item {
 | 
				
			|||||||
             uniform highp vec4 fontColor;
 | 
					             uniform highp vec4 fontColor;
 | 
				
			||||||
             uniform highp vec4 backgroundColor;
 | 
					             uniform highp vec4 backgroundColor;
 | 
				
			||||||
             uniform lowp float shadowLength;
 | 
					             uniform lowp float shadowLength;
 | 
				
			||||||
 | 
					             uniform lowp float frameGloss;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
             uniform highp vec2 virtualResolution;
 | 
					             uniform highp vec2 virtualResolution;
 | 
				
			||||||
             uniform lowp float rasterizationIntensity;\n" +
 | 
					             uniform lowp float rasterizationIntensity;\n" +
 | 
				
			||||||
@@ -317,8 +321,8 @@ Item {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                 (burnIn !== 0 ? "
 | 
					                 (burnIn !== 0 ? "
 | 
				
			||||||
                     vec4 txt_blur = texture2D(burnInSource, staticCoords);
 | 
					                     vec4 txt_blur = texture2D(burnInSource, staticCoords);
 | 
				
			||||||
                     float blurDecay = clamp((time - burnInLastUpdate) * burnInTime, 0.0, 1.0);
 | 
					                     float blurDecay = clamp(pow(0.5, burnInTime * (time - burnInLastUpdate)), 0.0, 1.0);
 | 
				
			||||||
                     vec3 burnInColor = 0.65 * (txt_blur.rgb - vec3(blurDecay));
 | 
					                     vec3 burnInColor = txt_blur.rgb * vec3(blurDecay);
 | 
				
			||||||
                     txt_color = max(txt_color, convertWithChroma(burnInColor));"
 | 
					                     txt_color = max(txt_color, convertWithChroma(burnInColor));"
 | 
				
			||||||
                 : "") +
 | 
					                 : "") +
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -336,7 +340,7 @@ Item {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                 (displayTerminalFrame ?
 | 
					                 (displayTerminalFrame ?
 | 
				
			||||||
                    "vec4 frameColor = texture2D(frameSource, qt_TexCoord0);
 | 
					                    "vec4 frameColor = texture2D(frameSource, qt_TexCoord0);
 | 
				
			||||||
                     finalColor = mix(finalColor, frameColor.rgb, frameColor.a);"
 | 
					                     finalColor = mix(finalColor, frameColor.rgb + (finalColor*frameGloss), frameColor.a);"
 | 
				
			||||||
                 : "") +
 | 
					                 : "") +
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                 "gl_FragColor = vec4(finalColor, qt_Opacity);" +
 | 
					                 "gl_FragColor = vec4(finalColor, qt_Opacity);" +
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,13 +22,13 @@ import QtQuick 2.0
 | 
				
			|||||||
import "utils.js" as Utils
 | 
					import "utils.js" as Utils
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ShaderEffect {
 | 
					ShaderEffect {
 | 
				
			||||||
    property color _staticFrameColor: "#fff"
 | 
					    property color _frameColor: 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)
 | 
				
			||||||
    property real _ambientLight: Utils.lint(0.2, 0.8, appSettings.ambientLight)
 | 
					    property real _ambientLight: Utils.lint(0.2, 0.8, appSettings.ambientLight)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    property color frameColor: Utils.mix(_staticFrameColor, _lightColor, _ambientLight)
 | 
					    property color frameColor: Utils.mix(_frameColor, _lightColor, _ambientLight)
 | 
				
			||||||
    property real screenCurvature: appSettings.screenCurvature * appSettings.screenCurvatureSize
 | 
					    property real screenCurvature: appSettings.screenCurvature * appSettings.screenCurvatureSize
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Coefficient of the log curve used to approximate shadowing
 | 
					    // Coefficient of the log curve used to approximate shadowing
 | 
				
			||||||
@@ -87,7 +87,7 @@ ShaderEffect {
 | 
				
			|||||||
            float alpha = 0.0;
 | 
					            float alpha = 0.0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            float frameShadow = max2(positiveLog(-coords * frameShadowCoeff + vec2(1.0)) + positiveLog(coords * frameShadowCoeff - (vec2(frameShadowCoeff) - vec2(1.0))));
 | 
					            float frameShadow = max2(positiveLog(-coords * frameShadowCoeff + vec2(1.0)) + positiveLog(coords * frameShadowCoeff - (vec2(frameShadowCoeff) - vec2(1.0))));
 | 
				
			||||||
            frameShadow = max(sqrt(frameShadow), 0.0);
 | 
					            frameShadow = clamp(sqrt(frameShadow), 0.0, 1.0);
 | 
				
			||||||
            color *= frameShadow;
 | 
					            color *= frameShadow;
 | 
				
			||||||
            alpha = sum2(1.0 - step(vec2(0.0), coords) + step(vec2(1.0), coords));
 | 
					            alpha = sum2(1.0 - step(vec2(0.0), coords) + step(vec2(1.0), coords));
 | 
				
			||||||
            alpha = clamp(alpha, 0.0, 1.0);
 | 
					            alpha = clamp(alpha, 0.0, 1.0);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user