fix notification overflow issue if the notification body is too long

This commit is contained in:
lucy 2025-12-27 21:07:52 +01:00
parent b6ae60e97c
commit 17151bd197
2 changed files with 6 additions and 8 deletions

View File

@ -13,7 +13,6 @@ WlrLayershell {
// Iterate through all connected Quickshell screens // Iterate through all connected Quickshell screens
for (let i = 0; i < Quickshell.screens.length; i++) { for (let i = 0; i < Quickshell.screens.length; i++) {
let screenCandidate = Quickshell.screens[i]; let screenCandidate = Quickshell.screens[i];
console.log(Quickshell.screens[i])
// Ask: "Is this screen the one Hyprland is currently focusing?" // Ask: "Is this screen the one Hyprland is currently focusing?"
if (Hyprland.monitorFor(screenCandidate) === Hyprland.focusedMonitor) { if (Hyprland.monitorFor(screenCandidate) === Hyprland.focusedMonitor) {
@ -31,9 +30,10 @@ WlrLayershell {
} }
margins { margins {
top: 30 top: 30
right: 10
} }
implicitWidth: 400 implicitWidth: 300
implicitHeight: notifList.contentHeight + 10 implicitHeight: notifList.contentHeight + 10
// 2. Layer: Put it ABOVE normal windows // 2. Layer: Put it ABOVE normal windows
@ -85,10 +85,9 @@ WlrLayershell {
border.color: Colors.color5 border.color: Colors.color5
// 2. Use RowLayout to put Image | Text side-by-side // 2. Use RowLayout to put Image | Text side-by-side
Row { RowLayout {
anchors.margins: 10 anchors.margins: 10
anchors.fill: parent anchors.fill: parent
anchors.centerIn: parent
spacing: 15 spacing: 15
// 🖼 THE IMAGE ON THE LEFT // 🖼 THE IMAGE ON THE LEFT
@ -134,9 +133,8 @@ WlrLayershell {
// Limit to 2 lines // Limit to 2 lines
maximumLineCount: 2 maximumLineCount: 2
wrapMode: Text.WordWrap wrapMode: Text.WrapAnywhere
elide: Text.ElideRight elide: Text.ElideRight
Layout.fillWidth: true Layout.fillWidth: true
} }
} }

View File

@ -28,8 +28,8 @@ WlrLayershell {
id: wallComponent id: wallComponent
Image { Image {
fillMode: Image.PreserveAspectCrop fillMode: Image.PreserveAspectCrop
width: StackView.view.width width: root.width
height: StackView.view.height height: root.height
asynchronous: true // VERY IMPORTANT: Prevents lag while loading! asynchronous: true // VERY IMPORTANT: Prevents lag while loading!
} }
} }