summaryrefslogtreecommitdiffstats
path: root/core/src/overlay.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-11-21 14:41:22 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-11-21 14:41:22 +0100
commit25006b9c6f2ae909d86871d3a13631d518c07158 (patch)
treee4bf993c1073cde4c6a847e38f8165f6efcecb21 /core/src/overlay.rs
parent7dd32f3be43c72e11dac5e07918e9ad6d36b6555 (diff)
downloadiced-25006b9c6f2ae909d86871d3a13631d518c07158.tar.gz
iced-25006b9c6f2ae909d86871d3a13631d518c07158.tar.bz2
iced-25006b9c6f2ae909d86871d3a13631d518c07158.zip
Fix `Overlay` composition
Translations were not easily composable.
Diffstat (limited to 'core/src/overlay.rs')
-rw-r--r--core/src/overlay.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/overlay.rs b/core/src/overlay.rs
index f71f25f7..af10afee 100644
--- a/core/src/overlay.rs
+++ b/core/src/overlay.rs
@@ -11,7 +11,7 @@ use crate::mouse;
use crate::renderer;
use crate::widget;
use crate::widget::Tree;
-use crate::{Clipboard, Layout, Point, Rectangle, Shell, Size};
+use crate::{Clipboard, Layout, Point, Rectangle, Shell, Size, Vector};
/// An interactive component that can be displayed on top of other widgets.
pub trait Overlay<Message, Renderer>
@@ -29,6 +29,7 @@ where
renderer: &Renderer,
bounds: Size,
position: Point,
+ translation: Vector,
) -> layout::Node;
/// Draws the [`Overlay`] using the associated `Renderer`.