layout/scrolling: Take parent area into account for popup unconstraining

This commit is contained in:
Ivan Molodetskikh
2025-06-09 13:44:34 +03:00
parent c9b1514d63
commit 3edb8fd906
+4 -2
View File
@@ -2450,11 +2450,13 @@ impl<W: LayoutElement> ScrollingSpace<W> {
if tile.window().id() == id {
// In the scrolling layout, we try to position popups horizontally within the
// window geometry (so they remain visible even if the window scrolls flush with
// the left/right edge of the screen), and vertically wihin the whole view size.
// the left/right edge of the screen), and vertically wihin the whole parent
// working area.
let width = tile.window_size().w;
let height = self.view_size.h;
let height = self.parent_area.size.h;
let mut target = Rectangle::from_size(Size::from((width, height)));
target.loc.y += self.parent_area.loc.y;
target.loc.y -= pos.y;
target.loc.y -= tile.window_loc().y;