From 7b8b01f560569ae18d9337a31ba94f6c1c2ba0dd Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 4 Feb 2023 12:24:13 +0100 Subject: Use `f32` in `Length::Units` and rename it to `Fixed` --- native/src/overlay/menu.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'native/src/overlay') diff --git a/native/src/overlay/menu.rs b/native/src/overlay/menu.rs index 9e37380f..bd1f309e 100644 --- a/native/src/overlay/menu.rs +++ b/native/src/overlay/menu.rs @@ -28,7 +28,7 @@ where options: &'a [T], hovered_option: &'a mut Option, last_selection: &'a mut Option, - width: u16, + width: f32, padding: Padding, text_size: Option, font: Renderer::Font, @@ -55,7 +55,7 @@ where options, hovered_option, last_selection, - width: 0, + width: 0.0, padding: Padding::ZERO, text_size: None, font: Default::default(), @@ -64,7 +64,7 @@ where } /// Sets the width of the [`Menu`]. - pub fn width(mut self, width: u16) -> Self { + pub fn width(mut self, width: f32) -> Self { self.width = width; self } @@ -142,7 +142,7 @@ where { state: &'a mut Tree, container: Container<'a, Message, Renderer>, - width: u16, + width: f32, target_height: f32, style: ::Style, } @@ -219,7 +219,7 @@ where }, ), ) - .width(Length::Units(self.width)); + .width(self.width); let mut node = self.container.layout(renderer, &limits); -- cgit