From 570600ce513e7e02b23c1da8322c68fbb876d1b0 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 4 Feb 2023 16:41:18 +0100 Subject: Use `Pixels` for `Text::size` --- native/src/widget/radio.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'native/src/widget/radio.rs') diff --git a/native/src/widget/radio.rs b/native/src/widget/radio.rs index 22aeb4ce..62bc2447 100644 --- a/native/src/widget/radio.rs +++ b/native/src/widget/radio.rs @@ -8,8 +8,8 @@ use crate::text; use crate::touch; use crate::widget::{self, Row, Text, Tree}; use crate::{ - Alignment, Clipboard, Color, Element, Layout, Length, Point, Rectangle, - Shell, Widget, + Alignment, Clipboard, Color, Element, Layout, Length, Pixels, Point, + Rectangle, Shell, Widget, }; pub use iced_style::radio::{Appearance, StyleSheet}; @@ -52,7 +52,7 @@ where width: Length, size: f32, spacing: u16, - text_size: Option, + text_size: Option, font: Renderer::Font, style: ::Style, } @@ -119,8 +119,8 @@ where } /// Sets the text size of the [`Radio`] button. - pub fn text_size(mut self, text_size: u16) -> Self { - self.text_size = Some(text_size); + pub fn text_size(mut self, text_size: impl Into) -> Self { + self.text_size = Some(text_size.into().0); self } -- cgit