nosignal-shell/modules/bar/components/Tray.qml
2 * r + 2 * t 89bb774012 refactor: manually animate rect if needed
No need for animate prop, it's used too little so just manually set it if needed to save memory
2025-05-10 18:49:10 +10:00

40 lines
956 B
QML

import "root:/widgets"
import "root:/services"
import "root:/config"
import Quickshell.Services.SystemTray
import QtQuick
StyledRect {
id: root
property color colour: Colours.palette.lavender
clip: true
visible: width > 0 && height > 0 // To avoid warnings about being visible with no size
BoxLayout {
Repeater {
model: SystemTray.items
TrayItem {
colour: root.colour
}
}
}
Behavior on implicitWidth {
NumberAnimation {
duration: Appearance.anim.durations.normal
easing.type: Easing.BezierSpline
easing.bezierCurve: Appearance.anim.curves.emphasized
}
}
Behavior on implicitHeight {
NumberAnimation {
duration: Appearance.anim.durations.normal
easing.type: Easing.BezierSpline
easing.bezierCurve: Appearance.anim.curves.emphasized
}
}
}