Skip to content

Commit 358585f

Browse files
authored
Merge pull request #365 from wlx-team/staging
wgui: fix incorrect text wrapping
2 parents 4f03213 + 153b77e commit 358585f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

wgui/src/widget/label.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,11 @@ impl WidgetObj for WidgetLabel {
158158
(run.line_w.max(width), total_lines + 1)
159159
});
160160
let height = total_lines as f32 * buffer.metrics().line_height;
161-
taffy::Size { width, height }
161+
162+
taffy::Size {
163+
width: width + 1.0, /* f32 aliasing fix */
164+
height,
165+
}
162166
}
163167

164168
fn get_id(&self) -> WidgetID {

0 commit comments

Comments
 (0)