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 "root:/config"
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
import Quickshell.Services.SystemTray
|
import Quickshell.Services.SystemTray
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import Qt5Compat.GraphicalEffects
|
import QtQuick.Effects
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: root
|
id: root
|
||||||
|
|
@ -46,17 +48,22 @@ MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
|
|
||||||
ColorOverlay {
|
Loader {
|
||||||
visible: BarConfig.tray.recolourIcons
|
|
||||||
anchors.fill: icon
|
anchors.fill: icon
|
||||||
source: icon
|
active: BarConfig.tray.recolourIcons
|
||||||
color: root.colour
|
asynchronous: true
|
||||||
|
|
||||||
Behavior on color {
|
sourceComponent: MultiEffect {
|
||||||
ColorAnimation {
|
source: icon
|
||||||
duration: Appearance.anim.durations.normal
|
colorizationColor: root.colour
|
||||||
easing.type: Easing.BezierSpline
|
colorization: 1
|
||||||
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import "root:/widgets"
|
||||||
import "root:/services"
|
import "root:/services"
|
||||||
import "root:/config"
|
import "root:/config"
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import Qt5Compat.GraphicalEffects
|
import QtQuick.Effects
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
|
|
@ -44,9 +44,12 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OpacityMask {
|
MultiEffect {
|
||||||
source: base
|
source: base
|
||||||
maskSource: root.mask
|
maskSource: root.mask
|
||||||
|
maskEnabled: true
|
||||||
|
maskSpreadAtMin: 1
|
||||||
|
maskThresholdMin: 0.4
|
||||||
|
|
||||||
x: root.vertical ? 0 : -parent.offset
|
x: root.vertical ? 0 : -parent.offset
|
||||||
y: root.vertical ? -parent.offset : 0
|
y: root.vertical ? -parent.offset : 0
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ Item {
|
||||||
id: layout
|
id: layout
|
||||||
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
layer.enabled: true
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
model: BarConfig.workspaces.shown
|
model: BarConfig.workspaces.shown
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue