From a467a037c3aee6cf659ec11a8deb744ca0408c59 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 17 Feb 2023 16:23:29 +0100 Subject: Use `Pixels` for `spacing` --- native/src/widget/radio.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'native/src/widget/radio.rs') diff --git a/native/src/widget/radio.rs b/native/src/widget/radio.rs index 4477b810..9daddfbc 100644 --- a/native/src/widget/radio.rs +++ b/native/src/widget/radio.rs @@ -51,7 +51,7 @@ where label: String, width: Length, size: f32, - spacing: u16, + spacing: f32, text_size: Option, font: Renderer::Font, style: ::Style, @@ -67,7 +67,7 @@ where pub const DEFAULT_SIZE: f32 = 28.0; /// The default spacing of a [`Radio`] button. - pub const DEFAULT_SPACING: u16 = 15; + pub const DEFAULT_SPACING: f32 = 15.0; /// Creates a new [`Radio`] button. /// @@ -113,8 +113,8 @@ where } /// Sets the spacing between the [`Radio`] button and the text. - pub fn spacing(mut self, spacing: u16) -> Self { - self.spacing = spacing; + pub fn spacing(mut self, spacing: impl Into) -> Self { + self.spacing = spacing.into().0; self } -- cgit