Skip to content

Commit 6e2b3aa

Browse files
committed
Fix top padding when rt has larger font size
1 parent b173e44 commit 6e2b3aa

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

lib/src/replaced_element.dart

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,18 @@ class RubyElement extends ReplacedElement {
127127
node = c;
128128
}
129129
});
130-
return Wrap(
131-
key: AnchorKey.of(context.parser.key, this),
132-
runSpacing: rubySize,
133-
children: widgets.map((e) => Row(
134-
crossAxisAlignment: CrossAxisAlignment.end,
135-
textBaseline: TextBaseline.alphabetic,
136-
mainAxisSize: MainAxisSize.min,
137-
children: [e],
138-
)).toList(),
130+
return Padding(
131+
padding: EdgeInsets.only(top: rubySize),
132+
child: Wrap(
133+
key: AnchorKey.of(context.parser.key, this),
134+
runSpacing: rubySize,
135+
children: widgets.map((e) => Row(
136+
crossAxisAlignment: CrossAxisAlignment.end,
137+
textBaseline: TextBaseline.alphabetic,
138+
mainAxisSize: MainAxisSize.min,
139+
children: [e],
140+
)).toList(),
141+
),
139142
);
140143
}
141144
}

0 commit comments

Comments
 (0)