mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 03:07:53 -06: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
1 changed files with 8 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue