chore: reset line height to null as default value (#5942)

This commit is contained in:
Annie 2024-08-12 18:08:54 +08:00 committed by GitHub
parent 1db8480b75
commit d3d9ab2fb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 12 additions and 6 deletions

View File

@ -60,6 +60,7 @@ class ChatAIMessageWidget extends StatelessWidget {
onAIResponseLimit: () { onAIResponseLimit: () {
return FlowyText( return FlowyText(
LocaleKeys.sideBar_askOwnerToUpgradeToAIMax.tr(), LocaleKeys.sideBar_askOwnerToUpgradeToAIMax.tr(),
lineHeight: 1.5,
maxLines: 10, maxLines: 10,
); );
}, },

View File

@ -162,6 +162,7 @@ class _FileUploadLocalState extends State<_FileUploadLocal> {
.tr(), .tr(),
fontSize: 16, fontSize: 16,
maxLines: 2, maxLines: 2,
lineHeight: 1.5,
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
], ],

View File

@ -204,6 +204,7 @@ class _UpgradeToAILocalPlanState extends State<_UpgradeToAILocalPlan> {
FlowyText.medium( FlowyText.medium(
LocaleKeys.sideBar_upgradeToAILocal.tr(), LocaleKeys.sideBar_upgradeToAILocal.tr(),
maxLines: 10, maxLines: 10,
lineHeight: 1.5,
), ),
const VSpace(4), const VSpace(4),
Opacity( Opacity(
@ -212,6 +213,7 @@ class _UpgradeToAILocalPlanState extends State<_UpgradeToAILocalPlan> {
LocaleKeys.sideBar_upgradeToAILocalDesc.tr(), LocaleKeys.sideBar_upgradeToAILocalDesc.tr(),
fontSize: 12, fontSize: 12,
maxLines: 10, maxLines: 10,
lineHeight: 1.5,
), ),
), ),
], ],

View File

@ -362,6 +362,7 @@ class _CurrentPathState extends State<_CurrentPath> {
widget.path, widget.path,
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
lineHeight: 1.5,
decoration: isHovering ? TextDecoration.underline : null, decoration: isHovering ? TextDecoration.underline : null,
color: isLM color: isLM
? const Color(0xFF005483) ? const Color(0xFF005483)

View File

@ -626,6 +626,7 @@ class _Heading extends StatelessWidget {
description!, description!,
fontSize: 12, fontSize: 12,
maxLines: 5, maxLines: 5,
lineHeight: 1.5,
), ),
), ),
], ],

View File

@ -41,8 +41,8 @@ class FlowyText extends StatelessWidget {
this.selectable = false, this.selectable = false,
this.fontFamily, this.fontFamily,
this.fallbackFontFamily, this.fallbackFontFamily,
// https://api.flutter.dev/flutter/painting/TextStyle/height.html // // https://api.flutter.dev/flutter/painting/TextStyle/height.html
this.lineHeight = 1.5, this.lineHeight,
this.figmaLineHeight, this.figmaLineHeight,
this.withTooltip = false, this.withTooltip = false,
this.isEmoji = false, this.isEmoji = false,
@ -61,7 +61,7 @@ class FlowyText extends StatelessWidget {
this.selectable = false, this.selectable = false,
this.fontFamily, this.fontFamily,
this.fallbackFontFamily, this.fallbackFontFamily,
this.lineHeight = 1.5, this.lineHeight,
this.withTooltip = false, this.withTooltip = false,
this.isEmoji = false, this.isEmoji = false,
this.strutStyle, this.strutStyle,
@ -82,7 +82,7 @@ class FlowyText extends StatelessWidget {
this.selectable = false, this.selectable = false,
this.fontFamily, this.fontFamily,
this.fallbackFontFamily, this.fallbackFontFamily,
this.lineHeight = 1.5, this.lineHeight,
this.withTooltip = false, this.withTooltip = false,
this.isEmoji = false, this.isEmoji = false,
this.strutStyle, this.strutStyle,
@ -102,7 +102,7 @@ class FlowyText extends StatelessWidget {
this.selectable = false, this.selectable = false,
this.fontFamily, this.fontFamily,
this.fallbackFontFamily, this.fallbackFontFamily,
this.lineHeight = 1.5, this.lineHeight,
this.withTooltip = false, this.withTooltip = false,
this.isEmoji = false, this.isEmoji = false,
this.strutStyle, this.strutStyle,
@ -122,7 +122,7 @@ class FlowyText extends StatelessWidget {
this.selectable = false, this.selectable = false,
this.fontFamily, this.fontFamily,
this.fallbackFontFamily, this.fallbackFontFamily,
this.lineHeight = 1.5, this.lineHeight,
this.withTooltip = false, this.withTooltip = false,
this.isEmoji = false, this.isEmoji = false,
this.strutStyle, this.strutStyle,