summaryrefslogtreecommitdiffstats
path: root/wgpu/src/layer.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-05-04 13:00:16 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-05-04 18:39:31 +0200
commit9499a8f9e6f9971dedfae563cb133232aa3cebc2 (patch)
tree54074dd8b1fc17d63ad92d84b6d2b4415ad29df6 /wgpu/src/layer.rs
parent8e8808f0e187ed6671441f5016f07bfcba426452 (diff)
downloadiced-9499a8f9e6f9971dedfae563cb133232aa3cebc2.tar.gz
iced-9499a8f9e6f9971dedfae563cb133232aa3cebc2.tar.bz2
iced-9499a8f9e6f9971dedfae563cb133232aa3cebc2.zip
Support configurable `LineHeight` in text widgets
Diffstat (limited to '')
-rw-r--r--wgpu/src/layer.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/wgpu/src/layer.rs b/wgpu/src/layer.rs
index b9fd044e..dcae0648 100644
--- a/wgpu/src/layer.rs
+++ b/wgpu/src/layer.rs
@@ -62,6 +62,7 @@ impl<'a> Layer<'a> {
),
color: Color::new(0.9, 0.9, 0.9, 1.0),
size: 20.0,
+ line_height: core::text::LineHeight::Relative(1.2),
font: Font::MONOSPACE,
horizontal_alignment: alignment::Horizontal::Left,
vertical_alignment: alignment::Vertical::Top,
@@ -114,6 +115,7 @@ impl<'a> Layer<'a> {
content,
bounds,
size,
+ line_height,
color,
font,
horizontal_alignment,
@@ -126,6 +128,7 @@ impl<'a> Layer<'a> {
content,
bounds: *bounds + translation,
size: *size,
+ line_height: *line_height,
color: *color,
font: *font,
horizontal_alignment: *horizontal_alignment,