From 17151bd1976b059d6662cfb8101c0937f04d54eb Mon Sep 17 00:00:00 2001 From: lucy Date: Sat, 27 Dec 2025 21:07:52 +0100 Subject: [PATCH] fix notification overflow issue if the notification body is too long --- modules/notifications/NotiPopup.qml | 10 ++++------ modules/wallpaper/Wallpaper.qml | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/modules/notifications/NotiPopup.qml b/modules/notifications/NotiPopup.qml index a636f88..203c6f1 100644 --- a/modules/notifications/NotiPopup.qml +++ b/modules/notifications/NotiPopup.qml @@ -13,7 +13,6 @@ WlrLayershell { // Iterate through all connected Quickshell screens for (let i = 0; i < Quickshell.screens.length; i++) { let screenCandidate = Quickshell.screens[i]; - console.log(Quickshell.screens[i]) // Ask: "Is this screen the one Hyprland is currently focusing?" if (Hyprland.monitorFor(screenCandidate) === Hyprland.focusedMonitor) { @@ -31,9 +30,10 @@ WlrLayershell { } margins { top: 30 + right: 10 } - implicitWidth: 400 + implicitWidth: 300 implicitHeight: notifList.contentHeight + 10 // 2. Layer: Put it ABOVE normal windows @@ -85,10 +85,9 @@ WlrLayershell { border.color: Colors.color5 // 2. Use RowLayout to put Image | Text side-by-side - Row { + RowLayout { anchors.margins: 10 anchors.fill: parent - anchors.centerIn: parent spacing: 15 // 🖼️ THE IMAGE ON THE LEFT @@ -134,9 +133,8 @@ WlrLayershell { // Limit to 2 lines maximumLineCount: 2 - wrapMode: Text.WordWrap + wrapMode: Text.WrapAnywhere elide: Text.ElideRight - Layout.fillWidth: true } } diff --git a/modules/wallpaper/Wallpaper.qml b/modules/wallpaper/Wallpaper.qml index 2d4edf5..4ef452c 100644 --- a/modules/wallpaper/Wallpaper.qml +++ b/modules/wallpaper/Wallpaper.qml @@ -28,8 +28,8 @@ WlrLayershell { id: wallComponent Image { fillMode: Image.PreserveAspectCrop - width: StackView.view.width - height: StackView.view.height + width: root.width + height: root.height asynchronous: true // ⚡ VERY IMPORTANT: Prevents lag while loading! } }