diff options
Diffstat (limited to 'kde-plasma/plasma-workspace/files/plasma-workspace-5.10.4-notifications.patch')
-rw-r--r-- | kde-plasma/plasma-workspace/files/plasma-workspace-5.10.4-notifications.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.10.4-notifications.patch b/kde-plasma/plasma-workspace/files/plasma-workspace-5.10.4-notifications.patch new file mode 100644 index 000000000000..e964eeb8beb8 --- /dev/null +++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.10.4-notifications.patch @@ -0,0 +1,69 @@ +commit 7e2a29b0b18abe31df68c2f176124acfbc15c438 +Author: Kai Uwe Broulik <kde@privat.broulik.de> +Date: Tue Aug 1 12:53:38 2017 +0200 + + [Notifications] Improve mouse handling + + * Make links clickable again + * Don't pass visualParent to context menu as we already give it a position, fixes it being positioned incorrectly + * Open context menu on press already like is done everywhere else + * Give "Copy" the edit-copy icon + * Deselect text after copying again, otherwise it stays selected but the user cannot unselect it. + + BUG: 382263 + FIXED-IN: 5.10.5 + + Differential Revision: https://phabricator.kde.org/D7029 + +diff --git a/applets/notifications/package/contents/ui/NotificationItem.qml b/applets/notifications/package/contents/ui/NotificationItem.qml +index dabf1b90..c260d588 100644 +--- a/applets/notifications/package/contents/ui/NotificationItem.qml ++++ b/applets/notifications/package/contents/ui/NotificationItem.qml +@@ -282,8 +282,6 @@ MouseArea { + wrapMode: Text.Wrap + textFormat: TextEdit.RichText + +- onLinkActivated: Qt.openUrlExternally(link) +- + // ensure selecting text scrolls the view as needed... + onCursorRectangleChanged: { + var flick = bodyTextScrollArea.flickableItem +@@ -297,23 +295,33 @@ MouseArea { + anchors.fill: parent + acceptedButtons: Qt.RightButton | Qt.LeftButton + +- onClicked: { +- if (mouse.button == Qt.RightButton) ++ onPressed: { ++ if (mouse.button === Qt.RightButton) { + contextMenu.open(mouse.x, mouse.y) +- else { +- notificationItem.clicked(mouse) ++ } ++ } ++ ++ onClicked: { ++ if (mouse.button === Qt.LeftButton) { ++ var link = bodyText.linkAt(mouse.x, mouse.y) ++ if (link) { ++ Qt.openUrlExternally(link) ++ } else { ++ notificationItem.clicked(mouse) ++ } + } + } + + PlasmaComponents.ContextMenu { + id: contextMenu +- visualParent: parent + + PlasmaComponents.MenuItem { + text: i18n("Copy") ++ icon: "edit-copy" + onClicked: { + bodyText.selectAll() + bodyText.copy() ++ bodyText.deselect() + } + } + } |