[Menu] Improved available space correction for openRelative
ClosedPublic

Authored by romangg on Mar 1 2017, 2:42 PM.

Details

Summary

There was already some kind of detection and adjustment if there is not enough space for the popup available. Do some more work by placing the popup according to its PopupPlacement enum. Do this also if the popup breaks the top or left boundary of the screen.

The goal is to never hide the parentItem, but in this revision this is yet violated for Types::TopPosedRightAlignedPopup and Types::LeftPosedBottomAlignedPopup if both respective screen limits are broken. The question is if we should it ignore it or place the popup then better to the side or bottom/top.

Also fixes some minor problems:

  • TopPosedRightAlignedPopup was the same as RightPosedTopAlignedPopup, but in the first case the menu should be on top of parentItem
  • LeftPosedTopAlignedPopup was above parentItem and not left of it
  • Small documentation error

Tested it with my WIP patch for plasma-pa:

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
romangg created this revision.Mar 1 2017, 2:42 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMar 1 2017, 2:42 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
romangg edited the summary of this revision. (Show Details)Mar 1 2017, 3:14 PM
hein accepted this revision.Mar 2 2017, 3:18 PM
This revision is now accepted and ready to land.Mar 2 2017, 3:18 PM
This revision was automatically updated to reflect the committed changes.