D8446: [Notifications] Allow selecting text with mouse
Kai Uwe Broulik
noreply at phabricator.kde.org
Tue Oct 24 12:52:17 UTC 2017
broulik created this revision.
broulik added reviewers: Plasma, VDG, apol.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.
REVISION SUMMARY
This was lost by the introduction of the default action as the MouseArea steals events from the TextField below.
To address this, selecting text and click handling has been implemented manually. Furthermore, the mouse cursor is changed to an IBeam cursor and turns into a hand when above hyperlinks whose URL can now also be copied separately from its text in the context menu.
BUG: 386118
FIXED-IN: 5.12.0
TEST PLAN
- Clicking action buttons still works
- Clicking a notification with default action will still trigger the default action. An action without will not do anything, ie. the dialog won't close, just as before
- Clicking a hyperlink will open it
- Click vs select drag feels natural, I implemented it using manhattan length similarly to MouseEventListener
- The cursor is an IBeam over the entire body text area and turns into a pointing hand when ontop of a hyperlink
- Right click menu "Select All" entries select all text, "Copy" copies the text. Ontop of Hyperlinks the "Copy Link" entry copies the hyperlink's URL
- Notification still seems to timeout properly, with or without user interaction
Needs https://phabricator.kde.org/D8445 (ungrab mouse hack) or else after having opened the context menu, you continue randomly selecting text as the MouseArea gets confused as to whether the mouse is pressed or not.
Only quirk I noticed is that while selecting text will scroll down the view as needed it won't work to scroll back up but whatever.
REPOSITORY
R120 Plasma Workspace
REVISION DETAIL
https://phabricator.kde.org/D8446
AFFECTED FILES
applets/notifications/package/contents/ui/NotificationItem.qml
To: broulik, #plasma, #vdg, apol
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20171024/79ed6a03/attachment-0001.html>
More information about the Plasma-devel
mailing list