Review Request 121698: Add edit context menu to TextField/TextArea

David Edmundson david at davidedmundson.co.uk
Sat Dec 27 17:36:28 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/121698/#review72561
-----------------------------------------------------------


If we do this, then we'll also need to do the same thing again in every place we use QtQuickControls without using Plasma which will lead to either immense code duplication or we'll end up with Plasma doing something different to everyone else. Neither is great.

IMHO it would be better to:
 - put this in kdeclarative as KTextEdit
 - make Plasma::Components::TextArea inherit from that
 - This also gives us a position in which to insert sonnet.

That would mean porting to QQC actions, but that's not really a bad thing? Would allow us to use the menu: property on TextArea.

- David Edmundson


On Dec. 27, 2014, 4:30 p.m., Kai Uwe Broulik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121698/
> -----------------------------------------------------------
> 
> (Updated Dec. 27, 2014, 4:30 p.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Repository: plasma-framework
> 
> 
> Description
> -------
> 
> This adds a context menu that is similar to what is found on regular textfields/textareas consisting of
> - Undo
> - Redo
> - Cut
> - Copy
> - Paste
> - Delete
> - Clear
> - Select All
> 
> It does not show the standard shortcuts as I couldn't figure out how that would be done. There's a "StandardKey" referenced by the QQC Action item but I couldn't find documentation about it and also I cannot use Action {} in a MenuItem.
> 
> 
> Diffs
> -----
> 
>   src/declarativeimports/plasmastyle/TextAreaStyle.qml 41299c5 
>   src/declarativeimports/plasmastyle/TextFieldStyle.qml 2e5b718 
>   src/declarativeimports/plasmastyle/private/EditContextMenuArea.qml PRE-CREATION 
> 
> Diff: https://git.reviewboard.kde.org/r/121698/diff/
> 
> 
> Testing
> -------
> 
> The menu seems to work as expected, items are enabled/disabled as needed or when the control is disabled. The MouseArea doesn't errorneously eat events either.
> 
> 
> File Attachments
> ----------------
> 
> Context menu in action
>   https://git.reviewboard.kde.org/media/uploaded/files/2014/12/27/ab2162e2-dc13-4c99-9a66-aaeeb08b6384__editcontextmenu.png
> 
> 
> Thanks,
> 
> Kai Uwe Broulik
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20141227/34aa3bc9/attachment.html>


More information about the Plasma-devel mailing list