Limit height of settings drop-down to window size

It seems to be very hard to limit it to not overlap with the action panel. Well, going out of the window is a bigger problem so at least we can fix that.

Contributes to issue CURA-6054.
This commit is contained in:
Ghostkeeper 2018-12-24 16:16:23 +01:00
parent b7a23399f5
commit c6c09a8327
No known key found for this signature in database
GPG Key ID: 86BEF881AE2CF276

View File

@ -165,6 +165,14 @@ Item
{
h = 200 * screenScaleFactor;
}
//Absolute mouse Y position in the window, to prevent it from going outside the window.
var mouse_absolute_y = mapToGlobal(mouseX, mouseY).y - UM.Preferences.getValue("general/window_top");
if(mouse_absolute_y > base.height)
{
h -= mouse_absolute_y - base.height;
}
UM.Preferences.setValue("view/settings_list_height", h);
}
}