summaryrefslogtreecommitdiffstats
path: root/native/src/widget/image.rs
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/widget/image.rs')
-rw-r--r--native/src/widget/image.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/native/src/widget/image.rs b/native/src/widget/image.rs
index b2541b87..1e203077 100644
--- a/native/src/widget/image.rs
+++ b/native/src/widget/image.rs
@@ -1,6 +1,6 @@
//! Display images in your user interface.
-use crate::{layout, Element, Hasher, Layout, Point, Widget};
+use crate::{layout, Element, Hasher, Layout, Length, Point, Widget};
use std::hash::Hash;
@@ -10,6 +10,14 @@ impl<Message, Renderer> Widget<Message, Renderer> for Image
where
Renderer: self::Renderer,
{
+ fn width(&self) -> Length {
+ self.width
+ }
+
+ fn height(&self) -> Length {
+ self.height
+ }
+
fn layout(
&self,
renderer: &Renderer,