diff options
Diffstat (limited to '')
-rw-r--r-- | graphics/src/backend.rs | 2 | ||||
-rw-r--r-- | graphics/src/renderer.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/graphics/src/backend.rs b/graphics/src/backend.rs index 2f8e9fc3..256b7ab5 100644 --- a/graphics/src/backend.rs +++ b/graphics/src/backend.rs @@ -32,7 +32,7 @@ pub trait Text { const ARROW_DOWN_ICON: char; /// Returns the default size of text. - fn default_size(&self) -> u16; + fn default_size(&self) -> f32; /// Measures the text contents with the given size and font, /// returning the size of a laid out paragraph that fits in the provided diff --git a/graphics/src/renderer.rs b/graphics/src/renderer.rs index 298cf4a1..e07e7206 100644 --- a/graphics/src/renderer.rs +++ b/graphics/src/renderer.rs @@ -130,14 +130,14 @@ where const CHECKMARK_ICON: char = B::CHECKMARK_ICON; const ARROW_DOWN_ICON: char = B::ARROW_DOWN_ICON; - fn default_size(&self) -> u16 { + fn default_size(&self) -> f32 { self.backend().default_size() } fn measure( &self, content: &str, - size: u16, + size: f32, font: Font, bounds: Size, ) -> (f32, f32) { |