feat: use multieffect instead of qt5compat
Also use loader for tray icon recolouring
This commit is contained in:
parent
5978db658c
commit
d01194d1fc
3 changed files with 23 additions and 12 deletions
|
|
@ -1,9 +1,11 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import "root:/config"
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Services.SystemTray
|
||||
import QtQuick
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Effects
|
||||
|
||||
MouseArea {
|
||||
id: root
|
||||
|
|
@ -46,17 +48,22 @@ MouseArea {
|
|||
anchors.fill: parent
|
||||
}
|
||||
|
||||
ColorOverlay {
|
||||
visible: BarConfig.tray.recolourIcons
|
||||
Loader {
|
||||
anchors.fill: icon
|
||||
source: icon
|
||||
color: root.colour
|
||||
active: BarConfig.tray.recolourIcons
|
||||
asynchronous: true
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: Appearance.anim.durations.normal
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Appearance.anim.curves.standard
|
||||
sourceComponent: MultiEffect {
|
||||
source: icon
|
||||
colorizationColor: root.colour
|
||||
colorization: 1
|
||||
|
||||
Behavior on colorizationColor {
|
||||
ColorAnimation {
|
||||
duration: Appearance.anim.durations.normal
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Appearance.anim.curves.standard
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import "root:/widgets"
|
|||
import "root:/services"
|
||||
import "root:/config"
|
||||
import QtQuick
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Effects
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
|
@ -44,9 +44,12 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
OpacityMask {
|
||||
MultiEffect {
|
||||
source: base
|
||||
maskSource: root.mask
|
||||
maskEnabled: true
|
||||
maskSpreadAtMin: 1
|
||||
maskThresholdMin: 0.4
|
||||
|
||||
x: root.vertical ? 0 : -parent.offset
|
||||
y: root.vertical ? -parent.offset : 0
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ Item {
|
|||
id: layout
|
||||
|
||||
spacing: 0
|
||||
layer.enabled: true
|
||||
|
||||
Repeater {
|
||||
model: BarConfig.workspaces.shown
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue