Skip to content

Commit 443dcc5

Browse files
committed
Skia: Fix no-wrap still wrapping text sometimes
Fixes #7080
1 parent a66aa2d commit 443dcc5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

internal/renderers/skia/textlayout.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ pub fn create_layout(
160160
}
161161

162162
let mut paragraph = builder.build();
163-
paragraph.layout(max_width.map_or(f32::MAX, |physical_width| physical_width.get()));
163+
paragraph.layout(
164+
max_width
165+
.filter(|_| wrap != items::TextWrap::NoWrap && overflow != items::TextOverflow::Elide)
166+
.map_or(f32::MAX, |physical_width| physical_width.get()),
167+
);
164168

165169
let layout_height = PhysicalLength::new(paragraph.height());
166170

0 commit comments

Comments
 (0)