mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-01-31 10:11:20 +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 _fontColor: "#ff8100"
|
||||
property string _frameColor: "#ffffff"
|
||||
property string saturatedColor: Utils.mix(Utils.strToColor("#FFFFFF"),
|
||||
Utils.strToColor(_fontColor),
|
||||
saturationColor * 0.5)
|
||||
@ -81,6 +82,7 @@ QtObject {
|
||||
_backgroundColor),
|
||||
Utils.strToColor(saturatedColor),
|
||||
0.7 + (contrast * 0.3))
|
||||
property color frameColor: Utils.strToColor(_frameColor)
|
||||
|
||||
property real staticNoise: 0.12
|
||||
property real screenCurvature: 0.3
|
||||
@ -251,6 +253,7 @@ QtObject {
|
||||
var settings = {
|
||||
"backgroundColor": _backgroundColor,
|
||||
"fontColor": _fontColor,
|
||||
"frameColor": _frameColor,
|
||||
"flickering": flickering,
|
||||
"horizontalSync": horizontalSync,
|
||||
"staticNoise": staticNoise,
|
||||
@ -345,6 +348,7 @@ QtObject {
|
||||
_backgroundColor = settings.backgroundColor
|
||||
!== undefined ? settings.backgroundColor : _backgroundColor
|
||||
_fontColor = settings.fontColor !== undefined ? settings.fontColor : _fontColor
|
||||
_frameColor = settings.frameColor !== undefined ? settings.frameColor : _frameColor
|
||||
|
||||
horizontalSync = settings.horizontalSync
|
||||
!== undefined ? settings.horizontalSync : horizontalSync
|
||||
|
@ -166,6 +166,13 @@ ColumnLayout {
|
||||
onColorSelected: appSettings._backgroundColor = color
|
||||
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
|
||||
|
||||
ShaderEffect {
|
||||
property color _staticFrameColor: "#fff"
|
||||
property color _frameColor: appSettings.frameColor
|
||||
property color _backgroundColor: appSettings.backgroundColor
|
||||
property color _fontColor: appSettings.fontColor
|
||||
property color _lightColor: Utils.mix(_fontColor, _backgroundColor, 0.2)
|
||||
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
|
||||
|
||||
// Coefficient of the log curve used to approximate shadowing
|
||||
|
Loading…
x
Reference in New Issue
Block a user