From a0b67850e0f68ad55e56b4937d0e251d3d9c21d8 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Sun, 26 Feb 2017 14:01:13 -0800 Subject: [PATCH] Showing up under toolbar on short screens --- src/QmlControls/DropPanel.qml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/QmlControls/DropPanel.qml b/src/QmlControls/DropPanel.qml index a0f2ab117..0bc38aedd 100644 --- a/src/QmlControls/DropPanel.qml +++ b/src/QmlControls/DropPanel.qml @@ -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 -- 2.22.0