Skip to content

Commit

Permalink
fix: Check the default text align for expanded texts
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Sep 29, 2024
1 parent 9caf182 commit d1658af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/core/src/render/skia_measurer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ pub fn create_label(

let mut paragraph = paragraph_builder.build();
paragraph.layout(
if font_style.max_lines == Some(1) && font_style.text_align == TextAlign::Start {
if font_style.max_lines == Some(1) && font_style.text_align == TextAlign::default() {
f32::MAX
} else {
area_size.width + 1.0
Expand Down Expand Up @@ -263,7 +263,7 @@ pub fn create_paragraph(

let mut paragraph = paragraph_builder.build();
paragraph.layout(
if font_style.max_lines == Some(1) && font_style.text_align == TextAlign::Start {
if font_style.max_lines == Some(1) && font_style.text_align == TextAlign::default() {
f32::MAX
} else {
area_size.width + 1.0
Expand Down

0 comments on commit d1658af

Please sign in to comment.