Review Request 127646: Add parameter to request collision detection against supplied menu coordinates

Eike Hein hein at kde.org
Wed Apr 13 17:24:17 UTC 2016


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

Review request for Plasma.


Repository: plasma-framework


Description
-------

This adds a parameter to open() to request the menu be positioned to collide against the supplied coordinates instead of the screen edge if there's insufficient space to show the entire menu next to the coordinates. This allows Task Manager-style positioning (which used to be hardcoded in C++ in the applet), where the menu is shown above a task item in a bottom panel and to the left of the task item in a right panel. Without this opt-in behavior, the menu goes as far below/right of the coordinates as it an until it collides with the screen edge, therefore overlapping with the item.

The new behavior defaults to off, to not change API behavior.

It's added as a new parameter instead of a declarative prop in keeping with the existing style - the open coordinates are not declarative either; the whole thing is treated as a one-shot procedural op.

This will be used by the Task Manager applet to position the task context menu more smartly.


Diffs
-----

  src/declarativeimports/plasmacomponents/qmenu.h 41e8865 
  src/declarativeimports/plasmacomponents/qmenu.cpp 2a96d77 

Diff: https://git.reviewboard.kde.org/r/127646/diff/


Testing
-------

Tested with rtl locales as well.


Thanks,

Eike Hein

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160413/788fd5bd/attachment.html>


More information about the Plasma-devel mailing list