fix: added missing hover tooltip to toolbar item (#3786)

This commit is contained in:
Kritarth Sharma
2023-11-10 13:12:40 +05:30
committed by GitHub
parent 889a313cc2
commit 3c7e636b65
3 changed files with 20 additions and 10 deletions

View File

@ -36,10 +36,13 @@ final alignToolbarItem = ToolbarItem(
final child = MouseRegion( final child = MouseRegion(
cursor: SystemMouseCursors.click, cursor: SystemMouseCursors.click,
child: FlowySvg( child: FlowyTooltip(
data, message: LocaleKeys.document_plugins_optionAction_align.tr(),
size: const Size.square(20), child: FlowySvg(
color: isHighlight ? highlightColor : Colors.white, data,
size: const Size.square(16),
color: isHighlight ? highlightColor : Colors.white,
),
), ),
); );

View File

@ -1,8 +1,11 @@
import 'package:appflowy/generated/flowy_svgs.g.dart'; import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/settings_appearance/font_family_setting.dart'; import 'package:appflowy/workspace/presentation/settings/widgets/settings_appearance/font_family_setting.dart';
import 'package:appflowy_backend/log.dart'; import 'package:appflowy_backend/log.dart';
import 'package:appflowy_editor/appflowy_editor.dart' hide Log; import 'package:appflowy_editor/appflowy_editor.dart' hide Log;
import 'package:appflowy_popover/appflowy_popover.dart'; import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra_ui/widget/flowy_tooltip.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
final customizeFontToolbarItem = ToolbarItem( final customizeFontToolbarItem = ToolbarItem(
@ -34,12 +37,15 @@ final customizeFontToolbarItem = ToolbarItem(
onResetFont: () async => await editorState.formatDelta(selection, { onResetFont: () async => await editorState.formatDelta(selection, {
AppFlowyRichTextKeys.fontFamily: null, AppFlowyRichTextKeys.fontFamily: null,
}), }),
child: const Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 4.0), padding: const EdgeInsets.symmetric(horizontal: 4.0),
child: FlowySvg( child: FlowyTooltip(
FlowySvgs.font_family_s, message: LocaleKeys.document_plugins_fonts.tr(),
size: Size.square(16.0), child: const FlowySvg(
color: Colors.white, FlowySvgs.font_family_s,
size: Size.square(16.0),
color: Colors.white,
),
), ),
), ),
), ),

View File

@ -616,6 +616,7 @@
"smartEditDisabled": "Connect OpenAI in Settings", "smartEditDisabled": "Connect OpenAI in Settings",
"discardResponse": "Do you want to discard the AI responses?", "discardResponse": "Do you want to discard the AI responses?",
"createInlineMathEquation": "Create equation", "createInlineMathEquation": "Create equation",
"fonts": "Fonts",
"toggleList": "Toggle list", "toggleList": "Toggle list",
"quoteList":"Quote list", "quoteList":"Quote list",
"numberedList":"Numbered list", "numberedList":"Numbered list",