give CustomIcon colorization

This commit is contained in:
end-4
2025-07-09 09:40:59 +07:00
parent 2d6a897a66
commit b0750506cf
3 changed files with 15 additions and 10 deletions
+1 -5
View File
@@ -206,11 +206,7 @@ Scope {
width: 19.5
height: 19.5
source: Config.options.bar.topLeftIcon == 'distro' ? SystemInfo.distroIcon : "spark-symbolic"
}
ColorOverlay {
anchors.fill: distroIcon
source: distroIcon
colorize: true
color: Appearance.colors.colOnLayer0
}
}
@@ -1,10 +1,13 @@
import QtQuick
import Quickshell
import Quickshell.Widgets
import Qt5Compat.GraphicalEffects
Item {
id: root
property bool colorize: false
property color color
property string source: ""
property string iconFolder: "root:/assets/icons" // The folder to check first
width: 30
@@ -21,4 +24,13 @@ Item {
}
implicitSize: root.height
}
Loader {
active: root.colorize
anchors.fill: iconImage
sourceComponent: ColorOverlay {
source: iconImage
color: root.color
}
}
}
@@ -121,11 +121,8 @@ Rectangle {
height: Appearance.font.pixelSize.large
source: messageData?.role == 'assistant' ? Ai.models[messageData?.model].icon :
messageData?.role == 'user' ? 'linux-symbolic' : 'desktop-symbolic'
}
ColorOverlay {
visible: modelIcon.visible
anchors.fill: modelIcon
source: modelIcon
colorize: true
color: Appearance.m3colors.m3onSecondaryContainer
}