Commit 9fc898b2 authored by Leander Schulten's avatar Leander Schulten
Browse files

UX: ControlItem: Do not open the settings Popup outside the viewport

parent e25e6420
Pipeline #191761 passed with stage
in 4 minutes and 53 seconds
......@@ -66,6 +66,7 @@ ControlItemTemplate{
let pos = mapToItem(item.parent,pressX,pressY);
// do not move the popup out of the viewport
pos.x = Math.min(pos.x,item.parent.width-popup.width-5);
pos.y = Math.min(pos.y,item.parent.height-popup.height-5);
pos = item.mapFromItem(item.parent,pos.x,pos.y);
popup.x = pos.x;
popup.y = pos.y;
Supports Markdown
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