summaryrefslogtreecommitdiffstats
path: root/native/src/widget.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-11-21 13:53:02 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-11-21 13:53:02 +0100
commit428509c84a142a653be3ec4bbff0c23c466c44fa (patch)
tree3e58bd880f10a5afb5b9b0b7bea8c9b26855eab2 /native/src/widget.rs
parent65eb218d3d7ba52b2869a586a1480eeb3c8f84e4 (diff)
parent5adefdf6613bfe0738b573eab1d280fa041f5417 (diff)
downloadiced-428509c84a142a653be3ec4bbff0c23c466c44fa.tar.gz
iced-428509c84a142a653be3ec4bbff0c23c466c44fa.tar.bz2
iced-428509c84a142a653be3ec4bbff0c23c466c44fa.zip
Merge branch 'master' into improvement/docs
Diffstat (limited to 'native/src/widget.rs')
-rw-r--r--native/src/widget.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/native/src/widget.rs b/native/src/widget.rs
index 9dd48697..61b66c5b 100644
--- a/native/src/widget.rs
+++ b/native/src/widget.rs
@@ -69,6 +69,10 @@ pub trait Widget<Message, Renderer>
where
Renderer: crate::Renderer,
{
+ fn width(&self) -> Length;
+
+ fn height(&self) -> Length;
+
/// Returns the [`Node`] of the [`Widget`].
///
/// This [`Node`] is used by the runtime to compute the [`Layout`] of the
@@ -83,14 +87,6 @@ where
limits: &layout::Limits,
) -> layout::Node;
- fn width(&self) -> Length {
- Length::Shrink
- }
-
- fn height(&self) -> Length {
- Length::Shrink
- }
-
/// Draws the [`Widget`] using the associated `Renderer`.
///
/// [`Widget`]: trait.Widget.html