summaryrefslogtreecommitdiffstats
path: root/native/src/text.rs
diff options
context:
space:
mode:
authorLibravatar Giuliano Bellini <100347457+GyulyVGC@users.noreply.github.com>2023-02-22 21:23:04 +0100
committerLibravatar GitHub <noreply@github.com>2023-02-22 21:23:04 +0100
commit4f41927155e7d4bc38497b0e298a0b23ccea6ca1 (patch)
tree70b7dbc1afdc62dfeaf42f0c62e8f4c01e407729 /native/src/text.rs
parenta35d6d2e4d59f71309f31c87ea5150959d639185 (diff)
parent666f3cd143047e49a010f0c97eabc7136f92aa35 (diff)
downloadiced-4f41927155e7d4bc38497b0e298a0b23ccea6ca1.tar.gz
iced-4f41927155e7d4bc38497b0e298a0b23ccea6ca1.tar.bz2
iced-4f41927155e7d4bc38497b0e298a0b23ccea6ca1.zip
Merge branch 'iced-rs:master' into master
Diffstat (limited to 'native/src/text.rs')
-rw-r--r--native/src/text.rs6
1 files changed, 3 insertions, 3 deletions
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