From d3d9ab2fb0877e3c239e390f9c67bc29822f187d Mon Sep 17 00:00:00 2001 From: Annie Date: Mon, 12 Aug 2024 18:08:54 +0800 Subject: [PATCH] chore: reset line height to null as default value (#5942) --- .../presentation/message/ai_text_message.dart | 1 + .../editor_plugins/file/file_upload_menu.dart | 1 + .../pages/setting_ai_view/settings_ai_view.dart | 2 ++ .../settings/pages/settings_manage_data_view.dart | 1 + .../pages/settings_plan_comparison_dialog.dart | 1 + .../flowy_infra_ui/lib/style_widget/text.dart | 12 ++++++------ 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/message/ai_text_message.dart b/frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/message/ai_text_message.dart index 7aa48b094f..4b711e4fda 100644 --- a/frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/message/ai_text_message.dart +++ b/frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/message/ai_text_message.dart @@ -60,6 +60,7 @@ class ChatAIMessageWidget extends StatelessWidget { onAIResponseLimit: () { return FlowyText( LocaleKeys.sideBar_askOwnerToUpgradeToAIMax.tr(), + lineHeight: 1.5, maxLines: 10, ); }, diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/file/file_upload_menu.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/file/file_upload_menu.dart index b819bb9869..a25e5c9b7c 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/file/file_upload_menu.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/file/file_upload_menu.dart @@ -162,6 +162,7 @@ class _FileUploadLocalState extends State<_FileUploadLocal> { .tr(), fontSize: 16, maxLines: 2, + lineHeight: 1.5, textAlign: TextAlign.center, ), ], diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/setting_ai_view/settings_ai_view.dart b/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/setting_ai_view/settings_ai_view.dart index a0b4ceacee..c5e160fb03 100644 --- a/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/setting_ai_view/settings_ai_view.dart +++ b/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/setting_ai_view/settings_ai_view.dart @@ -204,6 +204,7 @@ class _UpgradeToAILocalPlanState extends State<_UpgradeToAILocalPlan> { FlowyText.medium( LocaleKeys.sideBar_upgradeToAILocal.tr(), maxLines: 10, + lineHeight: 1.5, ), const VSpace(4), Opacity( @@ -212,6 +213,7 @@ class _UpgradeToAILocalPlanState extends State<_UpgradeToAILocalPlan> { LocaleKeys.sideBar_upgradeToAILocalDesc.tr(), fontSize: 12, maxLines: 10, + lineHeight: 1.5, ), ), ], diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/settings_manage_data_view.dart b/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/settings_manage_data_view.dart index a4dd5b222f..2aa1a40037 100644 --- a/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/settings_manage_data_view.dart +++ b/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/settings_manage_data_view.dart @@ -362,6 +362,7 @@ class _CurrentPathState extends State<_CurrentPath> { widget.path, maxLines: 2, overflow: TextOverflow.ellipsis, + lineHeight: 1.5, decoration: isHovering ? TextDecoration.underline : null, color: isLM ? const Color(0xFF005483) diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/settings_plan_comparison_dialog.dart b/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/settings_plan_comparison_dialog.dart index 3334450c73..f2dec9550c 100644 --- a/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/settings_plan_comparison_dialog.dart +++ b/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/settings_plan_comparison_dialog.dart @@ -626,6 +626,7 @@ class _Heading extends StatelessWidget { description!, fontSize: 12, maxLines: 5, + lineHeight: 1.5, ), ), ], diff --git a/frontend/appflowy_flutter/packages/flowy_infra_ui/lib/style_widget/text.dart b/frontend/appflowy_flutter/packages/flowy_infra_ui/lib/style_widget/text.dart index 5da368870f..8260a19b3b 100644 --- a/frontend/appflowy_flutter/packages/flowy_infra_ui/lib/style_widget/text.dart +++ b/frontend/appflowy_flutter/packages/flowy_infra_ui/lib/style_widget/text.dart @@ -41,8 +41,8 @@ class FlowyText extends StatelessWidget { this.selectable = false, this.fontFamily, this.fallbackFontFamily, - // https://api.flutter.dev/flutter/painting/TextStyle/height.html - this.lineHeight = 1.5, + // // https://api.flutter.dev/flutter/painting/TextStyle/height.html + this.lineHeight, this.figmaLineHeight, this.withTooltip = false, this.isEmoji = false, @@ -61,7 +61,7 @@ class FlowyText extends StatelessWidget { this.selectable = false, this.fontFamily, this.fallbackFontFamily, - this.lineHeight = 1.5, + this.lineHeight, this.withTooltip = false, this.isEmoji = false, this.strutStyle, @@ -82,7 +82,7 @@ class FlowyText extends StatelessWidget { this.selectable = false, this.fontFamily, this.fallbackFontFamily, - this.lineHeight = 1.5, + this.lineHeight, this.withTooltip = false, this.isEmoji = false, this.strutStyle, @@ -102,7 +102,7 @@ class FlowyText extends StatelessWidget { this.selectable = false, this.fontFamily, this.fallbackFontFamily, - this.lineHeight = 1.5, + this.lineHeight, this.withTooltip = false, this.isEmoji = false, this.strutStyle, @@ -122,7 +122,7 @@ class FlowyText extends StatelessWidget { this.selectable = false, this.fontFamily, this.fallbackFontFamily, - this.lineHeight = 1.5, + this.lineHeight, this.withTooltip = false, this.isEmoji = false, this.strutStyle,