diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/mobile_toolbar_v3/appflowy_mobile_toolbar.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/mobile_toolbar_v3/appflowy_mobile_toolbar.dart index 787ccfda9f5cf..695bf66222fa8 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/mobile_toolbar_v3/appflowy_mobile_toolbar.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/mobile_toolbar_v3/appflowy_mobile_toolbar.dart @@ -407,16 +407,25 @@ class _MobileToolbarState extends State<_MobileToolbar> var keyboardHeight = height; if (defaultTargetPlatform == TargetPlatform.android) { if (!showingMenu) { - // take the max value of the keyboard height and the view padding - // to make sure the toolbar is above the keyboard - keyboardHeight = max( - keyboardHeight, - MediaQuery.of(context).viewInsets.bottom, - ); + final viewInsetsBottom = MediaQuery.of(context).viewInsets.bottom; + // Always use viewInsets when keyboard is visible to ensure accurate positioning + // This prevents the toolbar from being hidden behind the keyboard + if (viewInsetsBottom > 0) { + keyboardHeight = viewInsetsBottom; + } else { + // Use cached height when keyboard is hiding + keyboardHeight = max(keyboardHeight, _globalCachedKeyboardHeight); + } } } if (keyboardHeight > 0) { + // Only cache the raw height without safety padding _globalCachedKeyboardHeight = keyboardHeight; + + // Add small safety margin on Android to account for keyboard toolbar + if (defaultTargetPlatform == TargetPlatform.android) { + keyboardHeight += 8.0; + } } return SizedBox( height: keyboardHeight, 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..6438b98361647 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( + style: HoverStyle( + hoverColor: Theme.of(context).colorScheme.secondaryContainer, + borderRadius: Corners.s6Border, + ), + 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).colorScheme.primary + : AFThemeExtension.of(context).strongText, ), const HSpace(6), SizedBox( height: 16, child: FlowyText.regular( LocaleKeys.settings_shortcutsPage_actions_resetDefault.tr(), - color: AFThemeExtension.of(context).strongText, + color: isHovering + ? Theme.of(context).colorScheme.primary + : AFThemeExtension.of(context).strongText, ), ), ], @@ -327,7 +336,7 @@ class _ShortcutSettingTileState extends State { child: Row( children: [ const HSpace(8), - Expanded( + Flexible( child: Padding( padding: const EdgeInsets.only(right: 10), child: FlowyText.regular(