From a5865adc962b3dfa7944b71ea222de5f7897445e Mon Sep 17 00:00:00 2001 From: lucy Date: Thu, 26 Mar 2026 20:09:19 +0100 Subject: [PATCH] change notification style --- Colors.qml | 32 ++++---- modules/notifications/NotificationCard.qml | 91 ++++++++++++---------- settings/settings.json | 4 +- 3 files changed, 66 insertions(+), 61 deletions(-) diff --git a/Colors.qml b/Colors.qml index f2bb447..7d09346 100644 --- a/Colors.qml +++ b/Colors.qml @@ -3,24 +3,24 @@ import QtQuick QtObject { // --- The Backgrounds (Darkest to Lightest) --- - readonly property string base00: "#0b0e14" // Default Background - readonly property string base01: "#131721" // Lighter Background (Status bars, panels) - readonly property string base02: "#202229" // Selection Background - readonly property string base03: "#3e4b59" // Comments, Invisibles, line highlighting + readonly property string base00: "#1e1e2e" // Default Background + readonly property string base01: "#181825" // Lighter Background (Status bars, panels) + readonly property string base02: "#313244" // Selection Background + readonly property string base03: "#45475a" // Comments, Invisibles, line highlighting // --- The Foregrounds (Darkest to Lightest) --- - readonly property string base04: "#bfbdb6" // Dark Foreground (Used for status bars) - readonly property string base05: "#e6e1cf" // Default Foreground, Caret - readonly property string base06: "#ece8db" // Light Foreground (Rarely used) - readonly property string base07: "#f2f0e7" // Lightest Foreground + readonly property string base04: "#585b70" // Dark Foreground (Used for status bars) + readonly property string base05: "#cdd6f4" // Default Foreground, Caret + readonly property string base06: "#f5e0dc" // Light Foreground (Rarely used) + readonly property string base07: "#b4befe" // Lightest Foreground // --- The Accent Colors --- - readonly property string base08: "#f07178" // Red (Variables, errors) - readonly property string base09: "#ff8f40" // Orange (Integers, booleans, constants) - readonly property string base0A: "#ffb454" // Yellow (Classes, search text bg, warnings) - readonly property string base0B: "#aad94c" // Green (Strings, success states) - readonly property string base0C: "#95e6cb" // Cyan (Support, regex, escape chars) - readonly property string base0D: "#59c2ff" // Blue (Functions, methods, headings) - readonly property string base0E: "#d2a6ff" // Purple/Mauve (Keywords, storage, selectors) - readonly property string base0F: "#e6b450" // Brown/Flamingo (Deprecated, embedded tags) + readonly property string base08: "#f38ba8" // Red (Variables, errors) + readonly property string base09: "#fab387" // Orange (Integers, booleans, constants) + readonly property string base0A: "#f9e2af" // Yellow (Classes, search text bg, warnings) + readonly property string base0B: "#a6e3a1" // Green (Strings, success states) + readonly property string base0C: "#94e2d5" // Cyan (Support, regex, escape chars) + readonly property string base0D: "#89b4fa" // Blue (Functions, methods, headings) + readonly property string base0E: "#cba6f7" // Purple/Mauve (Keywords, storage, selectors) + readonly property string base0F: "#f2cdcd" // Brown/Flamingo (Deprecated, embedded tags) } diff --git a/modules/notifications/NotificationCard.qml b/modules/notifications/NotificationCard.qml index e16dcd3..47544cc 100644 --- a/modules/notifications/NotificationCard.qml +++ b/modules/notifications/NotificationCard.qml @@ -21,64 +21,69 @@ Rectangle { running: true onTriggered: notifyItem.modelData.expire() } - RowLayout { id: fullLayout anchors.margins: 20 anchors.fill: parent - anchors.centerIn: parent spacing: 10 - ClippingWrapperRectangle { - id: notiIconWrapper - Layout.alignment: Qt.AlignTop - radius: notifyItem.radius - notifyItem.radius / 3 - implicitWidth: notiIcon.implicitSize - color: "transparent" - implicitHeight: notiIcon.implicitSize - visible: notifyItem.modelData.image !== "" - IconImage { - id: notiIcon - source: notifyItem.modelData.image !== "" ? notifyItem.modelData.image : Quickshell.iconPath("preferences-desktop-notification-bell") - implicitSize: 64 - asynchronous: true - } - } - ColumnLayout { id: textLayout Layout.fillWidth: true Layout.alignment: Qt.AlignTop spacing: 0 - CText { - id: appName - text: notifyItem.modelData.appName - opacity: 0.5 - font.pixelSize: 10 - } - CText { - id: summary - text: notifyItem.modelData.summary - font.bold: true - elide: Text.ElideRight - Layout.fillWidth: true - Layout.bottomMargin: 0 - Layout.topMargin: 5 - maximumLineCount: 1 - onTextChanged: { - dismissTimer.restart(); + // New RowLayout to hold the Icon and App Name together + RowLayout { + id: iconTextLayout + spacing: 8 + + ClippingWrapperRectangle { + id: notiIconWrapper + radius: notifyItem.radius - notifyItem.radius / 3 + implicitWidth: notiIcon.implicitSize + implicitHeight: notiIcon.implicitSize + color: "transparent" + + child: IconImage { + id: notiIcon + // Keep your existing source logic + source: notifyItem.modelData.image !== "" ? notifyItem.modelData.image : Quickshell.iconPath("/usr/share/icons/Papirus/24x24/panel/notifications.svg") + implicitSize: 22 // Slightly smaller to match text height + asynchronous: true + } + } + + CText { + id: appName + text: notifyItem.modelData.appName + opacity: 0.5 + font.pixelSize: 10 } } + ColumnLayout { + spacing: 0 + Layout.alignment: Qt.AlignHCenter + Layout.leftMargin: notiIcon.implicitWidth + iconTextLayout.spacing + CText { + id: summary + text: notifyItem.modelData.summary + font.bold: true + elide: Text.ElideRight + Layout.fillWidth: true + Layout.topMargin: 5 + } - CText { - text: notifyItem.modelData.body - font.pixelSize: Settings.config.fontSize - 2 - maximumLineCount: 1 - opacity: 0.3 - wrapMode: Text.WordWrap - elide: Text.ElideRight - Layout.fillWidth: true + CText { + text: notifyItem.modelData.body + font.pixelSize: Settings.config.fontSize - 2 + maximumLineCount: 1 + opacity: 0.3 + wrapMode: Text.WordWrap + elide: Text.ElideRight + Layout.fillWidth: true + Layout.alignment: Qt.AlignHCenter + } } } } diff --git a/settings/settings.json b/settings/settings.json index 15eb9dd..d28f17c 100644 --- a/settings/settings.json +++ b/settings/settings.json @@ -2,8 +2,8 @@ "barHeight": 32, "barSpacing": 10, "barmargins": 6, - "currentWall": "/home/lucy/.walls/mooon.png", - "floating": false, + "currentWall": "/home/lucy/.walls/frierensuff.png", + "floating": true, "font": "Google Sans", "fontSize": 13, "margins": 10,