From 17072ab16ba4948cc9fe07d9f230e546d1b7917e Mon Sep 17 00:00:00 2001 From: RishiAhuja Date: Tue, 7 Oct 2025 10:23:10 +0530 Subject: [PATCH 1/4] fix: shortcut tile layout spacing --- .../presentation/settings/pages/settings_shortcuts_view.dart | 2 ++ 1 file changed, 2 insertions(+) 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..1f9112d6b4e3a 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 @@ -328,6 +328,7 @@ class _ShortcutSettingTileState extends State { children: [ const HSpace(8), Expanded( + flex: 3, // Give more space to the label child: Padding( padding: const EdgeInsets.only(right: 10), child: FlowyText.regular( @@ -340,6 +341,7 @@ class _ShortcutSettingTileState extends State { ), ), Expanded( + flex: 2, // Give less space to keybindings (better than 50/50) child: isEditing ? _renderKeybindEditor() : _renderKeybindings(isHovering), From 10d3fbb557b424995a461e5c1a381c83ac498171 Mon Sep 17 00:00:00 2001 From: RishiAhuja Date: Tue, 7 Oct 2025 10:31:02 +0530 Subject: [PATCH 2/4] fix: shortcut tile layout spacing --- .../presentation/settings/pages/settings_shortcuts_view.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 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 1f9112d6b4e3a..ee19055b28c4a 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 @@ -328,7 +328,7 @@ class _ShortcutSettingTileState extends State { children: [ const HSpace(8), Expanded( - flex: 3, // Give more space to the label + flex: 3, child: Padding( padding: const EdgeInsets.only(right: 10), child: FlowyText.regular( @@ -341,7 +341,7 @@ class _ShortcutSettingTileState extends State { ), ), Expanded( - flex: 2, // Give less space to keybindings (better than 50/50) + flex: 2, // more space for the keybindings (better than 50/50) as mentioned. child: isEditing ? _renderKeybindEditor() : _renderKeybindings(isHovering), From 91942abd118d8e031a34c150a656eb67c30733a3 Mon Sep 17 00:00:00 2001 From: RishiAhuja Date: Tue, 7 Oct 2025 10:37:35 +0530 Subject: [PATCH 3/4] fix: improve hover effect for reset button in shortcuts settings --- .../settings/pages/settings_shortcuts_view.dart | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 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 ee19055b28c4a..448dc5b7885d8 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,23 +153,32 @@ class _ResetButton extends StatelessWidget { behavior: HitTestBehavior.translucent, onTap: onReset, child: FlowyHover( - child: Padding( + resetHoverOnRebuild: false, + style: HoverStyle( + hoverColor: Theme.of(context).colorScheme.secondaryContainer, + ), + builder: (context, isHovering) => Padding( padding: const EdgeInsets.symmetric( vertical: 4.0, horizontal: 6, ), child: Row( children: [ - const FlowySvg( + FlowySvg( FlowySvgs.restore_s, - size: Size.square(20), + size: const Size.square(20), + color: isHovering + ? Theme.of(context).iconTheme.color + : AFThemeExtension.of(context).onBackground, ), const HSpace(6), SizedBox( height: 16, child: FlowyText.regular( LocaleKeys.settings_shortcutsPage_actions_resetDefault.tr(), - color: AFThemeExtension.of(context).strongText, + color: isHovering + ? AFThemeExtension.of(context).strongText + : AFThemeExtension.of(context).onBackground, ), ), ], From 7d9b36a2779f2b7429bc48faf630044bf066062d Mon Sep 17 00:00:00 2001 From: RishiAhuja Date: Tue, 7 Oct 2025 14:24:32 +0530 Subject: [PATCH 4/4] fix: adjust layout for shortcut setting tiles --- .../pages/settings_shortcuts_view.dart | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 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 448dc5b7885d8..d661649eb28b8 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 @@ -334,10 +334,10 @@ class _ShortcutSettingTileState extends State { builder: (context, isHovering) => Padding( padding: const EdgeInsets.symmetric(vertical: 4), child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ const HSpace(8), Expanded( - flex: 3, child: Padding( padding: const EdgeInsets.only(right: 10), child: FlowyText.regular( @@ -349,12 +349,9 @@ class _ShortcutSettingTileState extends State { ), ), ), - Expanded( - flex: 2, // more space for the keybindings (better than 50/50) as mentioned. - child: isEditing - ? _renderKeybindEditor() - : _renderKeybindings(isHovering), - ), + isEditing + ? _renderKeybindEditor() + : _renderKeybindings(isHovering), ], ), ), @@ -363,6 +360,7 @@ class _ShortcutSettingTileState extends State { } Widget _renderKeybindings(bool isHovering) => Row( + mainAxisSize: MainAxisSize.min, children: [ if (widget.command.keybindings.isNotEmpty) ...[ ..._toParts(widget.command.keybindings.first).map( @@ -371,8 +369,8 @@ class _ShortcutSettingTileState extends State { ] else ...[ const SizedBox(height: 24), ], - const Spacer(), - if (isHovering) + if (isHovering) ...[ + const HSpace(8), GestureDetector( onTap: () { if (widget.canStartEditing()) { @@ -393,7 +391,7 @@ class _ShortcutSettingTileState extends State { ), ), ), - const HSpace(8), + ], ], );