mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: cursor height error
This commit is contained in:
@ -41,6 +41,8 @@ class _FlowyRichTextState extends State<FlowyRichText> with Selectable {
|
|||||||
final _textKey = GlobalKey();
|
final _textKey = GlobalKey();
|
||||||
final _placeholderTextKey = GlobalKey();
|
final _placeholderTextKey = GlobalKey();
|
||||||
|
|
||||||
|
final lineHeight = 1.5;
|
||||||
|
|
||||||
RenderParagraph get _renderParagraph =>
|
RenderParagraph get _renderParagraph =>
|
||||||
_textKey.currentContext?.findRenderObject() as RenderParagraph;
|
_textKey.currentContext?.findRenderObject() as RenderParagraph;
|
||||||
|
|
||||||
@ -145,6 +147,7 @@ class _FlowyRichTextState extends State<FlowyRichText> with Selectable {
|
|||||||
? Colors.transparent
|
? Colors.transparent
|
||||||
: Colors.grey,
|
: Colors.grey,
|
||||||
fontSize: baseFontSize,
|
fontSize: baseFontSize,
|
||||||
|
height: lineHeight,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -200,6 +203,7 @@ class _FlowyRichTextState extends State<FlowyRichText> with Selectable {
|
|||||||
.map((insert) => RichTextStyle(
|
.map((insert) => RichTextStyle(
|
||||||
attributes: insert.attributes ?? {},
|
attributes: insert.attributes ?? {},
|
||||||
text: insert.content,
|
text: insert.content,
|
||||||
|
height: lineHeight,
|
||||||
).toTextSpan())
|
).toTextSpan())
|
||||||
.toList(growable: false),
|
.toList(growable: false),
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user