D21971: [DEMO] Enhance ToggleActionMenu with ImplicitDefaultAction mode.

David Hurka noreply at phabricator.kde.org
Sun Jul 28 17:36:56 BST 2019


davidhurka added a comment.


  In D21971#503218 <https://phabricator.kde.org/D21971#503218>, @simgunz wrote:
  
  > Suggested changes:
  >
  > - Make `QToolButton::MenuButtonPopup`, and `ToggleActionMenu::ImplicitDefaultAction` the defaults in the constructor so we can call it as `d->aMouseModeMenu = new ToggleActionMenu( QIcon(),QString(), this);`
  
  
  That would make the longer way necessary for my own ideas, where I have put “Configure...” into the Color Mode menu.
  
  > - I do not fully understand the purpose of the method `setSuggestedDefaultAction`. I would remove it and leave only `setDefaultAction`.
  
  I don’t think the ImplicitDefaultAction mode makes sense without it. For the mouse mode menu (as shown in this patch), it is needed, because the default action should be Text Selection, because that mode is most likely needed. But it is possible that Area Selection is already checked, and in that case Area Selection should be shown on the toolbar button.
  
  Or do you mean ImplicitDefaultAction mode should change the behaviour of setDefaultAction(), so it only suggests the default action? I don’t think that’s good, because it will not really “set” then. Additionally, toggleactionmenu.cpp:57 would not work like it is done now.
  
  > This is how I am currently using it: [...]
  
  Yeah, in that case I would recommend suggestDefaultAction(), for the case that annStraightLine is already checked.

REPOSITORY
  R223 Okular

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

To: davidhurka
Cc: simgunz, okular-devel, maguirre, fbampaloukas, joaonetto, kezik, tfella, ngraham, darcyshen, aacid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20190728/cc6d952b/attachment.html>


More information about the Okular-devel mailing list