Use Pixels for Text::size

This commit is contained in:
Héctor Ramón Jiménez 2023-02-04 16:41:18 +01:00
parent de7fc637cf
commit a2ab9e9395
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
7 changed files with 19 additions and 25 deletions

View file

@ -163,7 +163,7 @@ where
self.width,
self.padding,
self.text_size,
self.font.unwrap_or_else(|| renderer.default_font()),
self.font,
self.placeholder.as_deref(),
&self.options,
)
@ -344,7 +344,7 @@ pub fn layout<Renderer, T>(
width: Length,
padding: Padding,
text_size: Option<f32>,
font: Renderer::Font,
font: Option<Renderer::Font>,
placeholder: Option<&str>,
options: &[T],
) -> layout::Node
@ -363,7 +363,7 @@ where
let (width, _) = renderer.measure(
label,
text_size,
font,
font.unwrap_or_else(|| renderer.default_font()),
Size::new(f32::INFINITY, f32::INFINITY),
);