Fix Overlay composition
Translations were not easily composable.
This commit is contained in:
parent
7dd32f3be4
commit
25006b9c6f
10 changed files with 70 additions and 26 deletions
|
|
@ -4,7 +4,9 @@ use crate::mouse;
|
|||
use crate::overlay;
|
||||
use crate::renderer;
|
||||
use crate::widget;
|
||||
use crate::{Clipboard, Event, Layout, Overlay, Point, Rectangle, Shell, Size};
|
||||
use crate::{
|
||||
Clipboard, Event, Layout, Overlay, Point, Rectangle, Shell, Size, Vector,
|
||||
};
|
||||
|
||||
/// An [`Overlay`] container that displays multiple overlay [`overlay::Element`]
|
||||
/// children.
|
||||
|
|
@ -64,10 +66,9 @@ where
|
|||
&mut self,
|
||||
renderer: &Renderer,
|
||||
bounds: Size,
|
||||
position: Point,
|
||||
_position: Point,
|
||||
translation: Vector,
|
||||
) -> layout::Node {
|
||||
let translation = position - Point::ORIGIN;
|
||||
|
||||
layout::Node::with_children(
|
||||
bounds,
|
||||
self.children
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue