mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
Merge pull request #924 from ChiragKr04/feat/grid-row-button-tooltip
fix: added tooltip for grid row action buttons
This commit is contained in:
commit
236fcedcd3
@ -95,7 +95,13 @@
|
||||
"tooltip": {
|
||||
"lightMode": "Switch to Light mode",
|
||||
"darkMode": "Switch to Dark mode",
|
||||
"openAsPage": "Open as a Page"
|
||||
"openAsPage": "Open as a Page",
|
||||
"addNewRow": "Add a new row",
|
||||
"openMenu": "Click to open menu"
|
||||
},
|
||||
"sideBar": {
|
||||
"closeSidebar": "Close side bar",
|
||||
"openSidebar": "Open side bar"
|
||||
},
|
||||
"notifications": {
|
||||
"export": {
|
||||
@ -215,9 +221,5 @@
|
||||
"timeHintTextInTwelveHour": "12:00 AM",
|
||||
"timeHintTextInTwentyFourHour": "12:00"
|
||||
}
|
||||
},
|
||||
"sideBar": {
|
||||
"openSidebar": "Open sidebar",
|
||||
"closeSidebar": "Close sidebar"
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,8 @@ import '../cell/cell_accessory.dart';
|
||||
import '../cell/cell_container.dart';
|
||||
import '../cell/prelude.dart';
|
||||
import 'row_action_sheet.dart';
|
||||
import "package:app_flowy/generated/locale_keys.g.dart";
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
class GridRowWidget extends StatefulWidget {
|
||||
final RowInfo rowInfo;
|
||||
@ -122,10 +124,13 @@ class _InsertRowButton extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final theme = context.watch<AppTheme>();
|
||||
return FlowyIconButton(
|
||||
tooltipText: LocaleKeys.tooltip_addNewRow.tr(),
|
||||
hoverColor: theme.hover,
|
||||
width: 20,
|
||||
height: 30,
|
||||
onPressed: () => context.read<RowBloc>().add(const RowEvent.createRow()),
|
||||
onPressed: () => context.read<RowBloc>().add(
|
||||
const RowEvent.createRow(),
|
||||
),
|
||||
iconPadding: const EdgeInsets.all(3),
|
||||
icon: svgWidget("home/add"),
|
||||
);
|
||||
@ -139,6 +144,7 @@ class _DeleteRowButton extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final theme = context.watch<AppTheme>();
|
||||
return FlowyIconButton(
|
||||
tooltipText: LocaleKeys.tooltip_openMenu.tr(),
|
||||
hoverColor: theme.hover,
|
||||
width: 20,
|
||||
height: 30,
|
||||
|
@ -26,6 +26,7 @@ import 'package:app_flowy/core/frameless_window.dart';
|
||||
// import 'package:app_flowy/workspace/presentation/home/home_sizes.dart';
|
||||
import 'package:flowy_infra/image.dart';
|
||||
import 'package:flowy_infra_ui/style_widget/icon_button.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
import 'app/menu_app.dart';
|
||||
import 'app/create_button.dart';
|
||||
@ -220,8 +221,8 @@ class MenuTopBar extends StatelessWidget {
|
||||
const Spacer(),
|
||||
Tooltip(
|
||||
richMessage: TextSpan(children: [
|
||||
const TextSpan(
|
||||
text: LocaleKeys.sideBar_closeSidebar + "\n"),
|
||||
TextSpan(
|
||||
text: LocaleKeys.sideBar_closeSidebar.tr() + "\n"),
|
||||
TextSpan(
|
||||
text: Platform.isMacOS ? "⌘+\\" : "Ctrl+\\",
|
||||
style: const TextStyle(color: Colors.white60),
|
||||
|
@ -11,6 +11,7 @@ import 'package:flowy_infra_ui/style_widget/text.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
typedef NaviAction = void Function();
|
||||
|
||||
@ -100,7 +101,7 @@ class FlowyNavigation extends StatelessWidget {
|
||||
turns: const AlwaysStoppedAnimation(180 / 360),
|
||||
child: Tooltip(
|
||||
richMessage: TextSpan(children: [
|
||||
const TextSpan(text: LocaleKeys.sideBar_openSidebar + "\n"),
|
||||
TextSpan(text: LocaleKeys.sideBar_openSidebar.tr() + "\n"),
|
||||
TextSpan(
|
||||
text: Platform.isMacOS ? "⌘+\\" : "Ctrl+\\",
|
||||
style: const TextStyle(color: Colors.white60),
|
||||
|
Loading…
Reference in New Issue
Block a user