diff options
Diffstat (limited to 'native/src/widget')
-rw-r--r-- | native/src/widget/button.rs | 8 | ||||
-rw-r--r-- | native/src/widget/checkbox.rs | 4 | ||||
-rw-r--r-- | native/src/widget/column.rs | 4 | ||||
-rw-r--r-- | native/src/widget/container.rs | 4 | ||||
-rw-r--r-- | native/src/widget/image.rs | 8 | ||||
-rw-r--r-- | native/src/widget/radio.rs | 4 | ||||
-rw-r--r-- | native/src/widget/row.rs | 4 | ||||
-rw-r--r-- | native/src/widget/scrollable.rs | 8 | ||||
-rw-r--r-- | native/src/widget/slider.rs | 4 | ||||
-rw-r--r-- | native/src/widget/text.rs | 4 | ||||
-rw-r--r-- | native/src/widget/text_input.rs | 4 |
11 files changed, 56 insertions, 0 deletions
diff --git a/native/src/widget/button.rs b/native/src/widget/button.rs index f2cce3d2..81cb9310 100644 --- a/native/src/widget/button.rs +++ b/native/src/widget/button.rs @@ -119,6 +119,14 @@ where Renderer: self::Renderer, Message: Clone, { + fn width(&self) -> Length { + self.width + } + + fn height(&self) -> Length { + Length::Shrink + } + fn layout( &self, renderer: &Renderer, diff --git a/native/src/widget/checkbox.rs b/native/src/widget/checkbox.rs index 47512089..f7bda146 100644 --- a/native/src/widget/checkbox.rs +++ b/native/src/widget/checkbox.rs @@ -72,6 +72,10 @@ where Length::Fill } + fn height(&self) -> Length { + Length::Shrink + } + fn layout( &self, renderer: &Renderer, diff --git a/native/src/widget/column.rs b/native/src/widget/column.rs index 8d98795c..87c51f48 100644 --- a/native/src/widget/column.rs +++ b/native/src/widget/column.rs @@ -118,6 +118,10 @@ where self.width } + fn height(&self) -> Length { + self.height + } + fn layout( &self, renderer: &Renderer, diff --git a/native/src/widget/container.rs b/native/src/widget/container.rs index 54117eb1..2f15573d 100644 --- a/native/src/widget/container.rs +++ b/native/src/widget/container.rs @@ -99,6 +99,10 @@ where self.width } + fn height(&self) -> Length { + self.height + } + fn layout( &self, renderer: &Renderer, diff --git a/native/src/widget/image.rs b/native/src/widget/image.rs index 8420ca76..696de683 100644 --- a/native/src/widget/image.rs +++ b/native/src/widget/image.rs @@ -58,6 +58,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, diff --git a/native/src/widget/radio.rs b/native/src/widget/radio.rs index a3a091b1..3dc764fe 100644 --- a/native/src/widget/radio.rs +++ b/native/src/widget/radio.rs @@ -82,6 +82,10 @@ where Length::Fill } + fn height(&self) -> Length { + Length::Shrink + } + fn layout( &self, renderer: &Renderer, diff --git a/native/src/widget/row.rs b/native/src/widget/row.rs index e63d8d20..33222b8a 100644 --- a/native/src/widget/row.rs +++ b/native/src/widget/row.rs @@ -120,6 +120,10 @@ where self.width } + fn height(&self) -> Length { + self.height + } + fn layout( &self, renderer: &Renderer, diff --git a/native/src/widget/scrollable.rs b/native/src/widget/scrollable.rs index d4568412..438f04cf 100644 --- a/native/src/widget/scrollable.rs +++ b/native/src/widget/scrollable.rs @@ -105,6 +105,14 @@ impl<'a, Message, Renderer> Widget<Message, Renderer> where Renderer: self::Renderer + column::Renderer, { + fn width(&self) -> Length { + Length::Fill + } + + fn height(&self) -> Length { + self.height + } + fn layout( &self, renderer: &Renderer, diff --git a/native/src/widget/slider.rs b/native/src/widget/slider.rs index f91d3ac5..113cc2a4 100644 --- a/native/src/widget/slider.rs +++ b/native/src/widget/slider.rs @@ -86,6 +86,10 @@ where self.width } + fn height(&self) -> Length { + Length::Shrink + } + fn layout( &self, renderer: &Renderer, diff --git a/native/src/widget/text.rs b/native/src/widget/text.rs index f949b607..c4ab88d3 100644 --- a/native/src/widget/text.rs +++ b/native/src/widget/text.rs @@ -117,6 +117,10 @@ where self.width } + fn height(&self) -> Length { + self.height + } + fn layout( &self, renderer: &Renderer, diff --git a/native/src/widget/text_input.rs b/native/src/widget/text_input.rs index bb5bb523..65306504 100644 --- a/native/src/widget/text_input.rs +++ b/native/src/widget/text_input.rs @@ -100,6 +100,10 @@ where self.width } + fn height(&self) -> Length { + Length::Shrink + } + fn layout( &self, renderer: &Renderer, |