Support configurable LineHeight in text widgets
This commit is contained in:
parent
8e8808f0e1
commit
9499a8f9e6
24 changed files with 337 additions and 42 deletions
|
|
@ -136,17 +136,26 @@ where
|
|||
&self,
|
||||
content: &str,
|
||||
size: f32,
|
||||
line_height: text::LineHeight,
|
||||
font: Font,
|
||||
bounds: Size,
|
||||
shaping: text::Shaping,
|
||||
) -> (f32, f32) {
|
||||
self.backend().measure(content, size, font, bounds, shaping)
|
||||
self.backend().measure(
|
||||
content,
|
||||
size,
|
||||
line_height,
|
||||
font,
|
||||
bounds,
|
||||
shaping,
|
||||
)
|
||||
}
|
||||
|
||||
fn hit_test(
|
||||
&self,
|
||||
content: &str,
|
||||
size: f32,
|
||||
line_height: text::LineHeight,
|
||||
font: Font,
|
||||
bounds: Size,
|
||||
shaping: text::Shaping,
|
||||
|
|
@ -156,6 +165,7 @@ where
|
|||
self.backend().hit_test(
|
||||
content,
|
||||
size,
|
||||
line_height,
|
||||
font,
|
||||
bounds,
|
||||
shaping,
|
||||
|
|
@ -173,6 +183,7 @@ where
|
|||
content: text.content.to_string(),
|
||||
bounds: text.bounds,
|
||||
size: text.size,
|
||||
line_height: text.line_height,
|
||||
color: text.color,
|
||||
font: text.font,
|
||||
horizontal_alignment: text.horizontal_alignment,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue