Use Pixels for Text::size
This commit is contained in:
parent
7b8b01f560
commit
570600ce51
16 changed files with 79 additions and 78 deletions
|
|
@ -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<u16>,
|
||||
text_size: Option<f32>,
|
||||
font: Renderer::Font,
|
||||
style: <Renderer::Theme as StyleSheet>::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<Pixels>) -> Self {
|
||||
self.text_size = Some(text_size.into().0);
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue