mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Pop-up flips directions
Contributes to CL-1165
This commit is contained in:
parent
0622c5cb8b
commit
9c711cc8aa
3 changed files with 131 additions and 63 deletions
|
|
@ -20,14 +20,7 @@ Item
|
|||
{
|
||||
id: popUp
|
||||
|
||||
// If the pop-up won't fit in the window, flip it
|
||||
direction:
|
||||
{
|
||||
var availableSpace = monitorFrame.height
|
||||
var targetPosition = target.mapToItem(null, 0, 0)
|
||||
var requiredSpace = targetPosition.y + target.height + contentWrapper.implicitHeight
|
||||
return requiredSpace < availableSpace ? "top" : "bottom"
|
||||
}
|
||||
direction: "top"
|
||||
|
||||
// Use dark grey for info blurbs and white for context menus
|
||||
color: "#191919" // TODO: Theme!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue