Only constrain popups to parent windows when there's enough space to do so

Otherwise, they will be aligned to the right side of the parent window, even in conditions where it does not make sense to do so. As an example, widgets in very small centered panels.

BUG:494338

Merge request reports

Loading