Tray, ActiveWindow: better dark mode colorization

This commit is contained in:
lysec
2025-10-24 13:32:52 +02:00
parent a5ab3aabb1
commit c9d3aedf39
4 changed files with 5 additions and 5 deletions

View File

@@ -99,7 +99,7 @@ Item {
SplitParser {
id: textStdoutSplit
onRead: function(line) {
onRead: function (line) {
var lineStr = String(line || "").trim()
var shouldCollapse = false

View File

@@ -136,7 +136,7 @@ Rectangle {
// Apply dock shader to all taskbar icons
layer.enabled: widgetSettings.colorizeIcons !== false
layer.effect: ShaderEffect {
property color targetColor: Settings.data.colorSchemes.darkMode ? Color.mSurface : Color.mSurfaceVariant
property color targetColor: Settings.data.colorSchemes.darkMode ? Color.mOnSurface : Color.mSurfaceVariant
property real colorizeMode: 0.0 // Dock mode (grayscale)
fragmentShader: Qt.resolvedUrl(Quickshell.shellDir + "/Shaders/qsb/appicon_colorize.frag.qsb")

View File

@@ -194,8 +194,8 @@ Rectangle {
layer.enabled: widgetSettings.colorizeIcons !== false
layer.effect: ShaderEffect {
property color targetColor: Settings.data.colorSchemes.darkMode ? Color.mSurface : Color.mSurfaceVariant
property real colorizeMode: 1.0 // Tray mode (intensity-based)
property color targetColor: Settings.data.colorSchemes.darkMode ? Color.mOnSurface : Color.mSurfaceVariant
property real colorizeMode: 1.0
fragmentShader: Qt.resolvedUrl(Quickshell.shellDir + "/Shaders/qsb/appicon_colorize.frag.qsb")
}

View File

@@ -101,7 +101,7 @@ Singleton {
const lines = text.trim().split('\n')
const newPercents = {}
// Start from line 1 (skip header)
for (let i = 1; i < lines.length; i++) {
for (var i = 1; i < lines.length; i++) {
const parts = lines[i].trim().split(/\s+/)
if (parts.length >= 2) {
const target = parts[0]