Implement explicit text caching in the widget state tree

This commit is contained in:
Héctor Ramón Jiménez 2023-08-30 04:31:21 +02:00
parent c9bd48704d
commit ed3454301e
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
79 changed files with 1910 additions and 1705 deletions

View file

@ -1,4 +1,4 @@
use crate::core::Font;
use crate::core::{Font, Pixels};
/// The settings of a [`Backend`].
///
@ -11,14 +11,14 @@ pub struct Settings {
/// The default size of text.
///
/// By default, it will be set to `16.0`.
pub default_text_size: f32,
pub default_text_size: Pixels,
}
impl Default for Settings {
fn default() -> Settings {
Settings {
default_font: Font::default(),
default_text_size: 16.0,
default_text_size: Pixels(16.0),
}
}
}