From 7784488a61a3a66e03ea2b387ca1e9da2f5e02fd Mon Sep 17 00:00:00 2001 From: purian23 Date: Sun, 15 Feb 2026 16:34:09 -0500 Subject: [PATCH] Fix height and truncate text/URLs --- .../Modules/Notifications/Center/NotificationCard.qml | 4 ++-- .../Modules/Notifications/Popup/NotificationPopup.qml | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/quickshell/Modules/Notifications/Center/NotificationCard.qml b/quickshell/Modules/Notifications/Center/NotificationCard.qml index e962f6c3..e2e1a407 100644 --- a/quickshell/Modules/Notifications/Center/NotificationCard.qml +++ b/quickshell/Modules/Notifications/Center/NotificationCard.qml @@ -595,7 +595,7 @@ Rectangle { width: parent.width elide: messageExpanded ? Text.ElideNone : Text.ElideRight maximumLineCount: messageExpanded ? -1 : 2 - wrapMode: Text.WordWrap + wrapMode: Text.WrapAtWordBoundaryOrAnywhere visible: text.length > 0 linkColor: Theme.primary onLinkActivated: link => Qt.openUrlExternally(link) @@ -778,7 +778,7 @@ Rectangle { anchors.right: clearButton.visible ? clearButton.left : parent.right anchors.rightMargin: clearButton.visible ? contentSpacing : Theme.spacingL anchors.top: collapsedContent.bottom - anchors.topMargin: contentSpacing + anchors.topMargin: contentSpacing + collapsedDismissOffset spacing: contentSpacing Repeater { diff --git a/quickshell/Modules/Notifications/Popup/NotificationPopup.qml b/quickshell/Modules/Notifications/Popup/NotificationPopup.qml index 16c43226..f14e9cb0 100644 --- a/quickshell/Modules/Notifications/Popup/NotificationPopup.qml +++ b/quickshell/Modules/Notifications/Popup/NotificationPopup.qml @@ -41,6 +41,7 @@ PanelWindow { readonly property real popupIconSize: compactMode ? Theme.notificationIconSizeCompact : Theme.notificationIconSizeNormal readonly property real contentSpacing: compactMode ? Theme.spacingXS : Theme.spacingS readonly property real contentBottomClearance: 5 + readonly property real actionRowOffset: 5 readonly property real actionButtonHeight: compactMode ? 20 : 24 readonly property real collapsedContentHeight: Math.max(popupIconSize, Theme.fontSizeSmall * 1.2 + Theme.fontSizeMedium * 1.2 + Theme.fontSizeSmall * 1.2 * (compactMode ? 1 : 2)) + contentBottomClearance readonly property real privacyCollapsedContentHeight: Math.max(popupIconSize, Theme.fontSizeSmall * 1.2 + Theme.fontSizeMedium * 1.2) + contentBottomClearance @@ -554,7 +555,7 @@ PanelWindow { elide: descriptionExpanded ? Text.ElideNone : Text.ElideRight horizontalAlignment: Text.AlignLeft maximumLineCount: descriptionExpanded ? -1 : (compactMode ? 1 : 2) - wrapMode: Text.WordWrap + wrapMode: Text.WrapAtWordBoundaryOrAnywhere visible: text.length > 0 opacity: (SettingsData.notificationPopupPrivacyMode && !descriptionExpanded) ? 0 : 1 linkColor: Theme.primary @@ -634,7 +635,7 @@ PanelWindow { anchors.right: clearButton.visible ? clearButton.left : parent.right anchors.rightMargin: clearButton.visible ? contentSpacing : Theme.spacingL anchors.top: notificationContent.bottom - anchors.topMargin: contentSpacing + anchors.topMargin: contentSpacing + actionRowOffset spacing: contentSpacing z: 20 @@ -702,7 +703,7 @@ PanelWindow { anchors.right: parent.right anchors.rightMargin: Theme.spacingL anchors.top: notificationContent.bottom - anchors.topMargin: contentSpacing + anchors.topMargin: contentSpacing + actionRowOffset width: Math.max(clearTextLabel.implicitWidth + Theme.spacingM, Theme.notificationActionMinWidth) height: actionButtonHeight radius: Theme.notificationButtonCornerRadius