Commit a0b67850 authored by Don Gagne's avatar Don Gagne

Showing up under toolbar on short screens

parent 501074d6
......@@ -44,11 +44,9 @@ Item {
property var _dropEdgeTopPoint
property real _dropEdgeHeight
property alias _dropDownComponent: dropDownLoader.sourceComponent
property real _viewportMaxLeft: -x + viewportMargins
property real _viewportMaxRight: parent.width - (viewportMargins * 2) - x
property real _viewportMaxTop: -y + viewportMargins
property real _viewportMaxBottom: parent.height - (viewportMargins * 2) - y
property alias _dropDownComponent: dropDownLoader.sourceComponent
property real _viewportMaxTop: 0
property real _viewportMaxBottom: parent.parent.height - parent.y
function show(panelEdgeTopPoint, panelEdgeHeight, panelComponent) {
_dropEdgeTopPoint = panelEdgeTopPoint
......@@ -88,8 +86,8 @@ Item {
dropItemHolderRect.x = _arrowPointHeight
// Validate that dropdown is within viewport
dropDownItem.y = Math.max(dropDownItem.y, _viewportMaxTop)
dropDownItem.y = Math.min(dropDownItem.y + dropDownItem.height, _viewportMaxBottom) - dropDownItem.height
dropDownItem.y = Math.max(dropDownItem.y, _viewportMaxTop)
// Arrow points
arrowCanvas.arrowPoint.y = (_dropEdgeTopPoint.y + radius) - dropDownItem.y
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment