mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-29 07:14:24 +08:00
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:
parent
b7a23399f5
commit
c6c09a8327
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user