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

(Updated April 14, 2016, 3:12 p.m.)


Status
------

This change has been marked as submitted.


Review request for Plasma.


Changes
-------

Submitted with commit 9bd7e4ce5fac36b90efcdb3224e4cd6267b1992b by Eike Hein to 
branch master.


Repository: plasma-framework


Description
-------

This adds a property of Plasma::Types::PopupPlacement to Menu as well as an 
openRelative() method that implements alternative popup placement behavior, 
making use of the property value (which defaults to top-left). Whereas open(x, 
y) falls trough to traditional QMenu placement which will try to extend the 
menu past the bottom-right of the coordinates as much as it can (up to bumping 
against the screen edge, and possibly covering the visualParent), 
openRelative(placement) interprets the values of the PopupPlacement enum as 
requesting collision/alignment against the specified corner of the 
visualParent, allowing users of the item to avoid the menu covering the 
visualParent.

The Task Manager applet will use this to provide smart context menu placement 
for task items, as done in the past.

A property instead of a method parameter was used because it's not possible to 
use enums from a different class in method parameters in QML (QTBUG-20639).

An openRelative() was added instead of using the placement property if open() 
falls back to parameter default values to keep open() behavior unchanged.


Diffs
-----

  src/declarativeimports/plasmacomponents/qmenu.h 34efe67 
  src/declarativeimports/plasmacomponents/qmenu.cpp 8ec1464 

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


Testing
-------

Tested with rtl locales as well.


Thanks,

Eike Hein

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to