mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-02-28 15:58:45 +00:00
Add frame color setting
It's saved in the profile, and defaults to white.
This commit is contained in:
parent
af6516789d
commit
a59ec1b47b
@ -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
|
||||||
@ -251,6 +253,7 @@ 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,
|
||||||
@ -345,6 +348,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
|
||||||
|
@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user