Fix Overlay composition

Translations were not easily composable.
This commit is contained in:
Héctor Ramón Jiménez 2023-11-21 14:41:22 +01:00
parent 7dd32f3be4
commit 25006b9c6f
No known key found for this signature in database
GPG key ID: 0BF4EC06CD8E5686
10 changed files with 70 additions and 26 deletions

View file

@ -6,7 +6,8 @@ use crate::core::renderer;
use crate::core::widget;
use crate::core::widget::tree::{self, Tree};
use crate::core::{
self, Clipboard, Element, Length, Point, Rectangle, Shell, Size, Widget,
self, Clipboard, Element, Length, Point, Rectangle, Shell, Size, Vector,
Widget,
};
use crate::horizontal_space;
use crate::runtime::overlay::Nested;
@ -367,9 +368,10 @@ where
renderer: &Renderer,
bounds: Size,
position: Point,
translation: Vector,
) -> layout::Node {
self.with_overlay_maybe(|overlay| {
overlay.layout(renderer, bounds, position)
overlay.layout(renderer, bounds, position, translation)
})
.unwrap_or_default()
}