Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
),
],
Expand Down Expand Up @@ -327,7 +336,7 @@ class _ShortcutSettingTileState extends State<ShortcutSettingTile> {
child: Row(
children: [
const HSpace(8),
Expanded(
Flexible(
child: Padding(
padding: const EdgeInsets.only(right: 10),
child: FlowyText.regular(
Expand Down