fix: ui: Markdown popups stopped taking vertical padding into account

Fix #1688
This commit is contained in:
Blaž Hrastnik 2022-02-21 23:23:20 +09:00
parent 865881ba19
commit 24f86017a6
No known key found for this signature in database
GPG Key ID: 1238B9C4AD889640

View File

@ -256,6 +256,6 @@ fn required_size(&mut self, viewport: (u16, u16)) -> Option<(u16, u16)> {
let max_text_width = (viewport.0 - padding).min(120);
let (width, height) = crate::ui::text::required_size(&contents, max_text_width);
Some((width + padding * 2, height))
Some((width + padding, height + padding))
}
}