fix(core/rust/ui): fix text baseline calculation

[no changelog]
pull/2905/head
Martin Milata 1 year ago
parent 4199d4ad41
commit 3623f966dc

@ -162,7 +162,9 @@ impl TextLayout {
}
pub fn initial_cursor(&self) -> Point {
self.bounds.top_left() + Offset::y(self.style.text_font.text_height() + self.padding_top)
let font = &self.style.text_font;
self.bounds.top_left()
+ Offset::y(font.text_max_height() - font.text_baseline() + self.padding_top)
}
pub fn fit_text(&self, text: &str) -> LayoutFit {

Loading…
Cancel
Save