summaryrefslogtreecommitdiffstats
path: root/native/src/widget/checkbox.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-02-04 16:41:18 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-02-17 15:47:51 +0100
commit570600ce513e7e02b23c1da8322c68fbb876d1b0 (patch)
treecf0c03e34469ad9005288e627e37f69d75aad0e7 /native/src/widget/checkbox.rs
parent7b8b01f560569ae18d9337a31ba94f6c1c2ba0dd (diff)
downloadiced-570600ce513e7e02b23c1da8322c68fbb876d1b0.tar.gz
iced-570600ce513e7e02b23c1da8322c68fbb876d1b0.tar.bz2
iced-570600ce513e7e02b23c1da8322c68fbb876d1b0.zip
Use `Pixels` for `Text::size`
Diffstat (limited to 'native/src/widget/checkbox.rs')
-rw-r--r--native/src/widget/checkbox.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/native/src/widget/checkbox.rs b/native/src/widget/checkbox.rs
index d2b5157a..835a0651 100644
--- a/native/src/widget/checkbox.rs
+++ b/native/src/widget/checkbox.rs
@@ -54,7 +54,7 @@ where
width: Length,
size: f32,
spacing: u16,
- text_size: Option<u16>,
+ text_size: Option<f32>,
font: Renderer::Font,
icon: Icon<Renderer::Font>,
style: <Renderer::Theme as StyleSheet>::Style,
@@ -120,8 +120,8 @@ where
}
/// Sets the text size of the [`Checkbox`].
- 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
}