D21755: [WIP] Replace ToolAction by a more universal “ToggleActionMenu”

Simone Gaiarin noreply at phabricator.kde.org
Mon Jun 17 15:50:57 BST 2019


simgunz added a comment.


  In D21755#480908 <https://phabricator.kde.org/D21755#480908>, @davidhurka wrote:
  
  > From my point of view, this is complete now. 3 TODOs left (see revision description at the top).
  >
  > ToolAction used its own tooltip for the toolbar buttons. Tell me if that is still needed.
  >
  > @simgunz you just told that you will use ToolAction? If you show me your implementation, it’s ok for me to use that instead. Otherwise you can tell me what you need (tooltips?). :)
  
  
  Currently I am using ToolAction in the new annotation toolbar to selected among different geometrical annotation. ToolAction is placed in the toolbar and behaves as it behave for the mouse selection tools. I think that replacing it with your more general tool is a good thing.
  For this purpose I need that the action are checkable, and that the ToggleActionMenu is checkable displaying the selected action (exaclty as ToolAction).
  
  I did remove the tooltip from ToolAction because it was broken: the tooltip was displayed when hoovering over the ToolAction while it was selected, and a different less informative tooltip was displayed when not selected. Moreover the tooltip was about holding the button, thing that now has been removed if I am not wrong. For my use case, I would probably need to be able to display tooltips for each action in the ToggleActionMenu, to describe what they are.
  
  If ToggleActionMenu provides the same functionality that ToolAction was providing I can use it without problems. I need to use it for Geometrical annotations and for the Stamp annotation. For this last one I would need to display the different available stamps, so each action in the ToggleActionMenu should just be a checkable action with a full width image and no text. Still not sure how to do this. Maybe I just need to create a custom QWidgetAction to represent the stamp, and than this action can be plugged into the ToggleActionMenu. Need to think about it.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D21755

To: davidhurka, #okular
Cc: simgunz, aacid, #vdg, okular-devel, fbampaloukas, joaonetto, tfella, ngraham, darcyshen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20190617/7d34f3a8/attachment.html>


More information about the Okular-devel mailing list