Use Pixels for Text::size
This commit is contained in:
parent
7b8b01f560
commit
570600ce51
16 changed files with 79 additions and 78 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue