Merge 73cb9e10b90a395dae90fc4564835df1cb6aa7d3 into f157648d1e51878a10e02a8836c1e15aa8c59cc9

This commit is contained in:
MinnieTheMoocher 2025-07-23 01:51:31 +00:00 committed by GitHub
commit 16f985e86e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 2 deletions

View File

@ -35,6 +35,7 @@ QtObject {
readonly property real maxBurnInFadeTime: 1600 readonly property real maxBurnInFadeTime: 1600
property bool isMacOS: Qt.platform.os === "osx" property bool isMacOS: Qt.platform.os === "osx"
property bool runsOnDarkDesktopTheme: (0.299 * palette.base.r + 0.587 * palette.base.g + 0.114 * palette.base.b) < 0.5
// GENERAL SETTINGS /////////////////////////////////////////////////////// // GENERAL SETTINGS ///////////////////////////////////////////////////////
property int x: 100 property int x: 100

View File

@ -358,6 +358,7 @@ Item {
id: terminalFrame id: terminalFrame
blending: false blending: false
anchors.fill: parent anchors.fill: parent
runsOnDarkDesktopTheme: appSettings.runsOnDarkDesktopTheme
} }
} }
} }

View File

@ -22,13 +22,15 @@ import QtQuick 2.0
import "utils.js" as Utils import "utils.js" as Utils
ShaderEffect { ShaderEffect {
property color _staticFrameColor: "#fff" property bool runsOnDarkDesktopTheme: false
property color _staticFrameColor: runsOnDarkDesktopTheme ? "black" : "white"
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: runsOnDarkDesktopTheme ? "black" : Utils.mix(_staticFrameColor, _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