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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 10 deletions

View File

@ -36,10 +36,13 @@ final alignToolbarItem = ToolbarItem(
final child = MouseRegion(
cursor: SystemMouseCursors.click,
child: FlowySvg(
data,
size: const Size.square(20),
color: isHighlight ? highlightColor : Colors.white,
child: FlowyTooltip(
message: LocaleKeys.document_plugins_optionAction_align.tr(),
child: FlowySvg(
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/locale_keys.g.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/settings_appearance/font_family_setting.dart';
import 'package:appflowy_backend/log.dart';
import 'package:appflowy_editor/appflowy_editor.dart' hide Log;
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';
final customizeFontToolbarItem = ToolbarItem(
@ -34,12 +37,15 @@ final customizeFontToolbarItem = ToolbarItem(
onResetFont: () async => await editorState.formatDelta(selection, {
AppFlowyRichTextKeys.fontFamily: null,
}),
child: const Padding(
padding: EdgeInsets.symmetric(horizontal: 4.0),
child: FlowySvg(
FlowySvgs.font_family_s,
size: Size.square(16.0),
color: Colors.white,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 4.0),
child: FlowyTooltip(
message: LocaleKeys.document_plugins_fonts.tr(),
child: const FlowySvg(
FlowySvgs.font_family_s,
size: Size.square(16.0),
color: Colors.white,
),
),
),
),

View File

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