diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-03 15:05:39 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-03 15:05:39 +1000 |
| commit | d01194d1fcc4f4eedb49b320613634e7a46722bf (patch) | |
| tree | f1bb8d7fade7e93bd9b097f5f1e5eebde92d7eb1 /modules/bar/components/TrayItem.qml | |
| parent | feat: launcher actions (diff) | |
| download | caelestia-shell-d01194d1fcc4f4eedb49b320613634e7a46722bf.tar.gz caelestia-shell-d01194d1fcc4f4eedb49b320613634e7a46722bf.tar.bz2 caelestia-shell-d01194d1fcc4f4eedb49b320613634e7a46722bf.zip | |
feat: use multieffect instead of qt5compat
Also use loader for tray icon recolouring
Diffstat (limited to 'modules/bar/components/TrayItem.qml')
| -rw-r--r-- | modules/bar/components/TrayItem.qml | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/modules/bar/components/TrayItem.qml b/modules/bar/components/TrayItem.qml index 1d418dc..b7ffdec 100644 --- a/modules/bar/components/TrayItem.qml +++ b/modules/bar/components/TrayItem.qml @@ -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 + + sourceComponent: MultiEffect { + source: icon + colorizationColor: root.colour + colorization: 1 - Behavior on color { - ColorAnimation { - duration: Appearance.anim.durations.normal - easing.type: Easing.BezierSpline - easing.bezierCurve: Appearance.anim.curves.standard + Behavior on colorizationColor { + ColorAnimation { + duration: Appearance.anim.durations.normal + easing.type: Easing.BezierSpline + easing.bezierCurve: Appearance.anim.curves.standard + } } } } |