From ad70441589fdb895b946befb9bb1fa7e70ca5be6 Mon Sep 17 00:00:00 2001 From: rope Date: Sat, 13 Jun 2026 19:36:11 +0100 Subject: [PATCH] quickshell: toast notification sits in a base02 card to match the calendar Co-Authored-By: Claude Fable 5 --- settings/quickshell.nix | 59 +++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/settings/quickshell.nix b/settings/quickshell.nix index fd938f1..ede6aec 100644 --- a/settings/quickshell.nix +++ b/settings/quickshell.nix @@ -2663,37 +2663,50 @@ in anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top width: 320 - height: toastItem.toastOpen ? toastCol.height + 16 : 0 + height: toastItem.toastOpen ? toastCard.height + 12 : 0 clip: true Behavior on height { NumberAnimation { duration: Theme.animMorph; easing.type: Easing.OutExpo } } - NotifContent { - id: toastCol - notif: toastItem.currentNotif + // Notification sits in a base02 rounded card, matching + // the calendar list. Inset 6px so the melt panel frames it. + Rectangle { + id: toastCard + anchors.top: parent.top anchors.left: parent.left - anchors.right: toastDismiss.left - anchors.top: parent.top - anchors.margins: 8 - onActionInvoked: toastItem.dismiss() - } - - SIcon { - id: toastDismiss anchors.right: parent.right - anchors.top: parent.top - anchors.margins: 8 - text: "close" - color: toastDismissMa.containsMouse ? Theme.base05 : Theme.base03 - font.pixelSize: 15 - MouseArea { - id: toastDismissMa - anchors.fill: parent - hoverEnabled: true - cursorShape: Qt.PointingHandCursor - onClicked: { toastItem.currentNotif.dismiss(); toastItem.dismiss(); } + anchors.margins: 6 + height: toastCol.height + 16 + radius: Theme.radiusSmall + color: Theme.base02 + + NotifContent { + id: toastCol + notif: toastItem.currentNotif + anchors.left: parent.left + anchors.right: toastDismiss.left + anchors.top: parent.top + anchors.margins: 8 + onActionInvoked: toastItem.dismiss() + } + + SIcon { + id: toastDismiss + anchors.right: parent.right + anchors.top: parent.top + anchors.margins: 8 + text: "close" + color: toastDismissMa.containsMouse ? Theme.base05 : Theme.base03 + font.pixelSize: 15 + MouseArea { + id: toastDismissMa + anchors.fill: parent + hoverEnabled: true + cursorShape: Qt.PointingHandCursor + onClicked: { toastItem.currentNotif.dismiss(); toastItem.dismiss(); } + } } } }