Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 5b8818f

Browse files
review
1 parent 322d5b6 commit 5b8818f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/web_ui/lib/src/engine/canvaskit/text.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ class CkParagraphStyle implements ui.ParagraphStyle {
8989
skStrutStyle.heightMultiplier = style._height;
9090
}
9191

92-
switch (style._leadingDistribution ?? paragraphHeightBehavior?.leadingDistribution) {
92+
final ui.TextLeadingDistribution? effectiveLeadingDistribution = style._leadingDistribution ?? paragraphHeightBehavior?.leadingDistribution;
93+
switch (effectiveLeadingDistribution) {
9394
case null:
9495
break;
9596
case ui.TextLeadingDistribution.even:

lib/web_ui/test/canvaskit/canvas_golden_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ void testMain() {
368368
),
369369
);
370370
await testTextStyle(
371-
'half leading',
371+
'half leading overrides paragraph style half leading',
372372
height: 20,
373373
fontSize: 10,
374374
leadingDistribution: ui.TextLeadingDistribution.proportional,

0 commit comments

Comments
 (0)