From 7f75744b78b02b6d57b86e69f3d1b0f67493febe Mon Sep 17 00:00:00 2001 From: Dhyan761 Date: Tue, 16 Dec 2025 13:40:04 +0530 Subject: [PATCH] hover effect --- .../pages/settings_shortcuts_view.dart | 44 ++++++------------- 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/settings_shortcuts_view.dart b/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/settings_shortcuts_view.dart index 3730f5e22f188..d2c9beb0f2c79 100644 --- a/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/settings_shortcuts_view.dart +++ b/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/settings_shortcuts_view.dart @@ -149,33 +149,15 @@ class _ResetButton extends StatelessWidget { @override Widget build(BuildContext context) { - return GestureDetector( - behavior: HitTestBehavior.translucent, - onTap: onReset, - child: FlowyHover( - child: Padding( - padding: const EdgeInsets.symmetric( - vertical: 4.0, - horizontal: 6, - ), - child: Row( - children: [ - const FlowySvg( - FlowySvgs.restore_s, - size: Size.square(20), - ), - const HSpace(6), - SizedBox( - height: 16, - child: FlowyText.regular( - LocaleKeys.settings_shortcutsPage_actions_resetDefault.tr(), - color: AFThemeExtension.of(context).strongText, - ), - ), - ], - ), - ), + return AFGhostIconTextButton.primary( + text: LocaleKeys.settings_shortcutsPage_actions_resetDefault.tr(), + onTap: onReset ?? () {}, + iconBuilder: (context, isHovering, disabled) => FlowySvg( + FlowySvgs.restore_s, + size: Size.square(20), + color: AFThemeExtension.of(context).textColor, ), + padding: const EdgeInsets.symmetric(vertical: 4.0, horizontal: 6), ); } } @@ -339,10 +321,12 @@ class _ShortcutSettingTileState extends State { ), ), ), - Expanded( - child: isEditing - ? _renderKeybindEditor() - : _renderKeybindings(isHovering), + Flexible( + fit: FlexFit.loose, + child: Align( + alignment: Alignment.centerRight, + child: isEditing ? _renderKeybindEditor() : _renderKeybindings(isHovering), + ), ), ], ),