Commit a0b67850 authored by Don Gagne's avatar Don Gagne

Showing up under toolbar on short screens

parent 501074d6
...@@ -44,11 +44,9 @@ Item { ...@@ -44,11 +44,9 @@ Item {
property var _dropEdgeTopPoint property var _dropEdgeTopPoint
property real _dropEdgeHeight property real _dropEdgeHeight
property alias _dropDownComponent: dropDownLoader.sourceComponent property alias _dropDownComponent: dropDownLoader.sourceComponent
property real _viewportMaxLeft: -x + viewportMargins property real _viewportMaxTop: 0
property real _viewportMaxRight: parent.width - (viewportMargins * 2) - x property real _viewportMaxBottom: parent.parent.height - parent.y
property real _viewportMaxTop: -y + viewportMargins
property real _viewportMaxBottom: parent.height - (viewportMargins * 2) - y
function show(panelEdgeTopPoint, panelEdgeHeight, panelComponent) { function show(panelEdgeTopPoint, panelEdgeHeight, panelComponent) {
_dropEdgeTopPoint = panelEdgeTopPoint _dropEdgeTopPoint = panelEdgeTopPoint
...@@ -88,8 +86,8 @@ Item { ...@@ -88,8 +86,8 @@ Item {
dropItemHolderRect.x = _arrowPointHeight dropItemHolderRect.x = _arrowPointHeight
// Validate that dropdown is within viewport // 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.min(dropDownItem.y + dropDownItem.height, _viewportMaxBottom) - dropDownItem.height
dropDownItem.y = Math.max(dropDownItem.y, _viewportMaxTop)
// Arrow points // Arrow points
arrowCanvas.arrowPoint.y = (_dropEdgeTopPoint.y + radius) - dropDownItem.y 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