diff options
| author | 2023-08-30 04:31:21 +0200 | |
|---|---|---|
| committer | 2023-08-30 04:31:21 +0200 | |
| commit | ed3454301e663a7cb7d73cd56b57b188f4d14a2f (patch) | |
| tree | 8118d1305c2eba3a1b45d04634cd0e8d050fc0fa /graphics/src/geometry | |
| parent | c9bd48704dd9679c033dd0b8588e2744a3df44a0 (diff) | |
| download | iced-ed3454301e663a7cb7d73cd56b57b188f4d14a2f.tar.gz iced-ed3454301e663a7cb7d73cd56b57b188f4d14a2f.tar.bz2 iced-ed3454301e663a7cb7d73cd56b57b188f4d14a2f.zip | |
Implement explicit text caching in the widget state tree
Diffstat (limited to '')
| -rw-r--r-- | graphics/src/geometry/text.rs | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/graphics/src/geometry/text.rs b/graphics/src/geometry/text.rs index c584f3cd..0bf7ec97 100644 --- a/graphics/src/geometry/text.rs +++ b/graphics/src/geometry/text.rs @@ -1,6 +1,6 @@  use crate::core::alignment;  use crate::core::text::{LineHeight, Shaping}; -use crate::core::{Color, Font, Point}; +use crate::core::{Color, Font, Pixels, Point};  /// A bunch of text that can be drawn to a canvas  #[derive(Debug, Clone)] @@ -19,7 +19,7 @@ pub struct Text {      /// The color of the text      pub color: Color,      /// The size of the text -    pub size: f32, +    pub size: Pixels,      /// The line height of the text.      pub line_height: LineHeight,      /// The font of the text @@ -38,7 +38,7 @@ impl Default for Text {              content: String::new(),              position: Point::ORIGIN,              color: Color::BLACK, -            size: 16.0, +            size: Pixels(16.0),              line_height: LineHeight::Relative(1.2),              font: Font::default(),              horizontal_alignment: alignment::Horizontal::Left, | 
