Merge pull request #365 from wlx-team/staging

wgui: fix incorrect text wrapping
This commit is contained in:
oo8dev 2026-01-10 11:31:59 +01:00 committed by GitHub
commit 358585fab5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -158,7 +158,11 @@ impl WidgetObj for WidgetLabel {
(run.line_w.max(width), total_lines + 1)
});
let height = total_lines as f32 * buffer.metrics().line_height;
taffy::Size { width, height }
taffy::Size {
width: width + 1.0, /* f32 aliasing fix */
height,
}
}
fn get_id(&self) -> WidgetID {