Showing
1 changed file
with
1 additions
and
2 deletions
@@ -282,7 +282,6 @@ class RichText extends Widget { | @@ -282,7 +282,6 @@ class RichText extends Widget { | ||
282 | double delta = 0; | 282 | double delta = 0; |
283 | switch (textAlign) { | 283 | switch (textAlign) { |
284 | case TextAlign.left: | 284 | case TextAlign.left: |
285 | - totalWidth = wordsWidth; | ||
286 | break; | 285 | break; |
287 | case TextAlign.right: | 286 | case TextAlign.right: |
288 | delta = totalWidth - wordsWidth; | 287 | delta = totalWidth - wordsWidth; |
@@ -503,7 +502,7 @@ class RichText extends Widget { | @@ -503,7 +502,7 @@ class RichText extends Widget { | ||
503 | width, | 502 | width, |
504 | _realignLine( | 503 | _realignLine( |
505 | _spans.sublist(lineStart), | 504 | _spans.sublist(lineStart), |
506 | - constraintWidth, | 505 | + lines > 1 ? constraintWidth : offsetX, |
507 | offsetX, | 506 | offsetX, |
508 | true, | 507 | true, |
509 | bottom, | 508 | bottom, |
-
Please register or login to post a comment