From 0e5b65c28cbb889928b91ff251a5f5b29f36dd9e Mon Sep 17 00:00:00 2001 From: Noah Menezes <2006noahmenezes@gmail.com> Date: Mon, 27 Jul 2026 22:17:22 +0530 Subject: [PATCH] fix(settings): fix reset button hover style and shortcut tile layout alignment (#8222) --- .../pages/settings_shortcuts_view.dart | 51 +++++++++++-------- 1 file changed, 29 insertions(+), 22 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..81ee91631dd4d 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 @@ -153,28 +153,34 @@ class _ResetButton extends StatelessWidget { 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, + builder: (context, isHovering) { + final color = isHovering + ? AFThemeExtension.of(context).caption + : AFThemeExtension.of(context).strongText; + return Padding( + padding: const EdgeInsets.symmetric( + vertical: 4.0, + horizontal: 6, + ), + child: Row( + children: [ + FlowySvg( + FlowySvgs.restore_s, + size: const Size.square(20), + color: color, ), - ), - ], - ), - ), + const HSpace(6), + SizedBox( + height: 16, + child: FlowyText.regular( + LocaleKeys.settings_shortcutsPage_actions_resetDefault.tr(), + color: color, + ), + ), + ], + ), + ); + }, ), ); } @@ -352,6 +358,7 @@ class _ShortcutSettingTileState extends State { } Widget _renderKeybindings(bool isHovering) => Row( + mainAxisAlignment: MainAxisAlignment.end, children: [ if (widget.command.keybindings.isNotEmpty) ...[ ..._toParts(widget.command.keybindings.first).map( @@ -360,7 +367,7 @@ class _ShortcutSettingTileState extends State { ] else ...[ const SizedBox(height: 24), ], - const Spacer(), + const HSpace(8), if (isHovering) GestureDetector( onTap: () {