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/text.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'native/src/text.rs') diff --git a/native/src/text.rs b/native/src/text.rs index 6e28681d..55c3cfd3 100644 --- a/native/src/text.rs +++ b/native/src/text.rs @@ -73,20 +73,20 @@ pub trait Renderer: crate::Renderer { const ARROW_DOWN_ICON: char; /// Returns the default size of [`Text`]. - fn default_size(&self) -> u16; + fn default_size(&self) -> f32; /// Measures the text in the given bounds and returns the minimum boundaries /// that can fit the contents. fn measure( &self, content: &str, - size: u16, + size: f32, font: Self::Font, bounds: Size, ) -> (f32, f32); /// Measures the width of the text as if it were laid out in a single line. - fn measure_width(&self, content: &str, size: u16, font: Self::Font) -> f32 { + fn measure_width(&self, content: &str, size: f32, font: Self::Font) -> f32 { let (width, _) = self.measure(content, size, font, Size::INFINITY); width -- cgit