[PATCH] applets/notifications: don't allow horizontal scrolling
authorChristoph Wolk <cwo.kde@posteo.net>
Thu, 8 May 2025 13:27:47 +0000 (15:27 +0200)
committerAurélien COUDERC <coucouf@debian.org>
Mon, 21 Jul 2025 16:21:10 +0000 (18:21 +0200)
Notification bodies have their width constrained by the notification and
the horizontal scrollbar forced off, but they can still be scrolled with
a horizontal wheel, touchpad, or similiar. This is surprising and
pointless.

Instead explicitly set the contentWidth, which is otherwise ultimately
based on the underlying TextEdit (and that's the width it would have on
a single line without wrapping).

Gbp-Pq: Name upstream_2c27c9db_applets-notifications-don-t-allow-horizontal-scrolling.patch

applets/notifications/package/contents/ui/delegates/DelegatePopup.qml

index e22a8322196e7cf9fc09007a3a991fa626d8949a..0aee40a5c87570f2e07b79f3bcf21b1e330e7f7d 100644 (file)
@@ -137,6 +137,7 @@ BaseDelegate {
         PlasmaComponents3.ScrollView {
             id: scroll
             anchors.fill: parent
+            contentWidth: bodyLabel.width
 
             // This avoids a binding loop
             PlasmaComponents3.ScrollBar.vertical.visible: modelInterface.maximumLineCount > 0 && bodyLabel.implicitHeight > parent.Layout.maximumHeight