Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/qml/ApplicationSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ QtObject {
readonly property real maxBurnInFadeTime: 1600

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 ///////////////////////////////////////////////////////
property int x: 100
Expand Down
1 change: 1 addition & 0 deletions app/qml/ShaderTerminal.qml
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ Item {
id: terminalFrame
blending: false
anchors.fill: parent
runsOnDarkDesktopTheme: appSettings.runsOnDarkDesktopTheme
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions app/qml/TerminalFrame.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ import QtQuick 2.0
import "utils.js" as Utils

ShaderEffect {
property color _staticFrameColor: "#fff"
property bool runsOnDarkDesktopTheme: false

property color _staticFrameColor: runsOnDarkDesktopTheme ? "black" : "white"
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: runsOnDarkDesktopTheme ? "black" : Utils.mix(_staticFrameColor, _lightColor, _ambientLight)
property real screenCurvature: appSettings.screenCurvature * appSettings.screenCurvatureSize

// Coefficient of the log curve used to approximate shadowing
Expand Down