summaryrefslogtreecommitdiff
path: root/modules/bar
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-29 20:52:02 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-29 20:52:02 +1000
commit4e41356d5c36aa8811590f0eb0d39396b5705bcf (patch)
tree99d2d757aac2ae606aec9b08d1bdaf7125faa3a8 /modules/bar
parentbluetooth: fix devices (diff)
downloadcaelestia-shell-4e41356d5c36aa8811590f0eb0d39396b5705bcf.tar.gz
caelestia-shell-4e41356d5c36aa8811590f0eb0d39396b5705bcf.tar.bz2
caelestia-shell-4e41356d5c36aa8811590f0eb0d39396b5705bcf.zip
bar: animate tray
Diffstat (limited to 'modules/bar')
-rw-r--r--modules/bar/components/Tray.qml65
1 files changed, 34 insertions, 31 deletions
diff --git a/modules/bar/components/Tray.qml b/modules/bar/components/Tray.qml
index 08b638d..7cc93be 100644
--- a/modules/bar/components/Tray.qml
+++ b/modules/bar/components/Tray.qml
@@ -7,47 +7,50 @@ import Quickshell.Services.SystemTray
import QtQuick
import Qt5Compat.GraphicalEffects
-BoxLayout {
- id: root
+StyledRect {
+ animate: true
+ clip: true
- Repeater {
- model: SystemTray.items
+ BoxLayout {
+ Repeater {
+ model: SystemTray.items
- MouseArea {
- id: item
+ MouseArea {
+ id: item
- required property SystemTrayItem modelData
+ required property SystemTrayItem modelData
- acceptedButtons: Qt.LeftButton | Qt.RightButton
- width: Math.round(Appearance.font.size.large * 1.2)
- height: Math.round(Appearance.font.size.large * 1.2)
+ acceptedButtons: Qt.LeftButton | Qt.RightButton
+ width: Math.round(Appearance.font.size.large * 1.2)
+ height: Math.round(Appearance.font.size.large * 1.2)
- onClicked: event => {
- if (event.button === Qt.LeftButton)
- modelData.activate();
- else if (modelData.hasMenu)
- menu.open();
- }
+ onClicked: event => {
+ if (event.button === Qt.LeftButton)
+ modelData.activate();
+ else if (modelData.hasMenu)
+ menu.open();
+ }
- QsMenuAnchor {
- id: menu
+ QsMenuAnchor {
+ id: menu
- menu: item.modelData.menu
- anchor.window: QsWindow.window
- }
+ menu: item.modelData.menu
+ anchor.window: QsWindow.window
+ }
- IconImage {
- id: icon
+ IconImage {
+ id: icon
- visible: false
- source: item.modelData.icon
- anchors.fill: parent
- }
+ visible: false
+ source: item.modelData.icon
+ anchors.fill: parent
+ }
- ColorOverlay {
- anchors.fill: icon
- source: icon
- color: Appearance.colours.lavender
+ ColorOverlay {
+ anchors.fill: icon
+ source: icon
+ color: Appearance.colours.lavender
+ }
}
}
}