[Menu] Popup above parent if would exceed screen boundaries

Review Request #126061 - Created Nov. 14, 2015 and discarded

Information
Kai Uwe Broulik
plasma-framework
master
Reviewers
plasma

QMenu is smart enough not to position itself outside the screen, however this can mean that the button the Menu originated from, could be covered. This can be observed with Widget Explorer's "get more widgets" buttons.

Ran the menu.qml test and moved the window around, positioning seemed sane. Also Widget Explorer more menu now pops up to the top.

I subtract the Y from the position to not break the most common usecase of popup(0, height) to have the menu pop up below the button. Now it pops up above it, still glued to it as it should be.

Issues

  • 1
  • 0
  • 0
  • 1
Description From Last Updated
maybe instead a qMin(screen height - menu height, pos.y()) ? Marco Martin Marco Martin
Marco Martin
David Edmundson
Sebastian Kügler
Albert Astals Cid
Kai Uwe Broulik
Review request changed

Status: Discarded

Loading...