diff options
| author | 2023-05-05 06:38:33 +0200 | |
|---|---|---|
| committer | 2023-05-05 06:38:33 +0200 | |
| commit | 7ae549aba8b5f651a6e7b1a84ddd48288b77f50c (patch) | |
| tree | 54074dd8b1fc17d63ad92d84b6d2b4415ad29df6 /graphics/src/geometry | |
| parent | 8e8808f0e187ed6671441f5016f07bfcba426452 (diff) | |
| parent | 9499a8f9e6f9971dedfae563cb133232aa3cebc2 (diff) | |
| download | iced-7ae549aba8b5f651a6e7b1a84ddd48288b77f50c.tar.gz iced-7ae549aba8b5f651a6e7b1a84ddd48288b77f50c.tar.bz2 iced-7ae549aba8b5f651a6e7b1a84ddd48288b77f50c.zip | |
Merge pull request #1828 from iced-rs/feature/line-height
Support configurable `LineHeight` in text widgets
Diffstat (limited to '')
| -rw-r--r-- | graphics/src/geometry/text.rs | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/graphics/src/geometry/text.rs b/graphics/src/geometry/text.rs index 0f731e74..c584f3cd 100644 --- a/graphics/src/geometry/text.rs +++ b/graphics/src/geometry/text.rs @@ -1,5 +1,5 @@  use crate::core::alignment; -use crate::core::text::Shaping; +use crate::core::text::{LineHeight, Shaping};  use crate::core::{Color, Font, Point};  /// A bunch of text that can be drawn to a canvas @@ -20,6 +20,8 @@ pub struct Text {      pub color: Color,      /// The size of the text      pub size: f32, +    /// The line height of the text. +    pub line_height: LineHeight,      /// The font of the text      pub font: Font,      /// The horizontal alignment of the text @@ -37,6 +39,7 @@ impl Default for Text {              position: Point::ORIGIN,              color: Color::BLACK,              size: 16.0, +            line_height: LineHeight::Relative(1.2),              font: Font::default(),              horizontal_alignment: alignment::Horizontal::Left,              vertical_alignment: alignment::Vertical::Top, | 
