fix: checkbox icon not aligned with the first line (#7997)

This commit is contained in:
Lucas 2025-05-28 10:48:31 +08:00 committed by GitHub
parent 8fcbf78714
commit 75f0f08c78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -99,7 +99,9 @@ class EditorStyleCustomizer {
defaultTextDirection: appearance.defaultTextDirection,
textStyleConfiguration: TextStyleConfiguration(
lineHeight: 1.4,
applyHeightToFirstAscent: true,
// on Windows, if applyHeightToFirstAscent is true, the first line will be too high.
// it will cause the first line not aligned with the prefix icon.
applyHeightToFirstAscent: UniversalPlatform.isWindows ? false : true,
applyHeightToLastDescent: true,
text: baseTextStyle(fontFamily).copyWith(
fontSize: fontSize,