aboutsummaryrefslogtreecommitdiff
path: root/modules/system/quickshell/PopupCard.qml
diff options
context:
space:
mode:
authorLeander Scherer <leander@schererleander.de>2026-05-18 21:48:24 +0200
committerLeander Scherer <leander@schererleander.de>2026-05-28 22:42:07 +0200
commit9a7cf1242d296dbdb9c03df48ab09054960295aa (patch)
treef1a2d5c77ef6bdb049c995afcc4c663c1ffd1373 /modules/system/quickshell/PopupCard.qml
parent3ef8b4973bcae26445f99467d50ad75730d204b5 (diff)
feat(quickshell): basic bar, tray, notification
Diffstat (limited to 'modules/system/quickshell/PopupCard.qml')
-rw-r--r--modules/system/quickshell/PopupCard.qml42
1 files changed, 42 insertions, 0 deletions
diff --git a/modules/system/quickshell/PopupCard.qml b/modules/system/quickshell/PopupCard.qml
new file mode 100644
index 0000000..6563877
--- /dev/null
+++ b/modules/system/quickshell/PopupCard.qml
@@ -0,0 +1,42 @@
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+
+Squircle {
+ id: root
+
+ readonly property int maxHeight: 440
+ property int margins: 16
+ default property alias content: contentCol.data
+
+ width: 320
+ height: Math.min(Math.max(contentCol.implicitHeight + 2 * margins, 80), maxHeight)
+
+ Behavior on height {
+ SpringAnimation { spring: 3; damping: 0.25 }
+ }
+
+ fillColor: Theme.bg
+ strokeColor: Theme.border
+ strokeWidth: 1
+ cornerRadius: 20
+ clip: true
+
+ ScrollView {
+ anchors {
+ fill: parent
+ margins: root.margins
+ }
+ clip: true
+ contentWidth: availableWidth
+ ScrollBar.vertical.policy: contentCol.implicitHeight > height
+ ? ScrollBar.AsNeeded
+ : ScrollBar.AlwaysOff
+
+ ColumnLayout {
+ id: contentCol
+ width: parent.width
+ spacing: 12
+ }
+ }
+}