forked from Shinonome/dots-hyprland
give CustomIcon colorization
This commit is contained in:
@@ -206,11 +206,7 @@ Scope {
|
|||||||
width: 19.5
|
width: 19.5
|
||||||
height: 19.5
|
height: 19.5
|
||||||
source: Config.options.bar.topLeftIcon == 'distro' ? SystemInfo.distroIcon : "spark-symbolic"
|
source: Config.options.bar.topLeftIcon == 'distro' ? SystemInfo.distroIcon : "spark-symbolic"
|
||||||
}
|
colorize: true
|
||||||
|
|
||||||
ColorOverlay {
|
|
||||||
anchors.fill: distroIcon
|
|
||||||
source: distroIcon
|
|
||||||
color: Appearance.colors.colOnLayer0
|
color: Appearance.colors.colOnLayer0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
|
import Qt5Compat.GraphicalEffects
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
property bool colorize: false
|
||||||
|
property color color
|
||||||
property string source: ""
|
property string source: ""
|
||||||
property string iconFolder: "root:/assets/icons" // The folder to check first
|
property string iconFolder: "root:/assets/icons" // The folder to check first
|
||||||
width: 30
|
width: 30
|
||||||
@@ -21,4 +24,13 @@ Item {
|
|||||||
}
|
}
|
||||||
implicitSize: root.height
|
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
|
height: Appearance.font.pixelSize.large
|
||||||
source: messageData?.role == 'assistant' ? Ai.models[messageData?.model].icon :
|
source: messageData?.role == 'assistant' ? Ai.models[messageData?.model].icon :
|
||||||
messageData?.role == 'user' ? 'linux-symbolic' : 'desktop-symbolic'
|
messageData?.role == 'user' ? 'linux-symbolic' : 'desktop-symbolic'
|
||||||
}
|
|
||||||
ColorOverlay {
|
colorize: true
|
||||||
visible: modelIcon.visible
|
|
||||||
anchors.fill: modelIcon
|
|
||||||
source: modelIcon
|
|
||||||
color: Appearance.m3colors.m3onSecondaryContainer
|
color: Appearance.m3colors.m3onSecondaryContainer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user