diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/home/hotkeys.dart b/frontend/appflowy_flutter/lib/workspace/presentation/home/hotkeys.dart index e979f102e3..b2d9945b2b 100644 --- a/frontend/appflowy_flutter/lib/workspace/presentation/home/hotkeys.dart +++ b/frontend/appflowy_flutter/lib/workspace/presentation/home/hotkeys.dart @@ -141,6 +141,16 @@ class _HomeHotKeysState extends State { keyDownHandler: (_) => _scaleWithStep(-0.1), ), + // Reset app scaling + HotKeyItem( + hotKey: HotKey( + KeyCode.digit0, + modifiers: [Platform.isMacOS ? KeyModifier.meta : KeyModifier.control], + scope: HotKeyScope.inapp, + ), + keyDownHandler: (_) => _scaleToSize(1), + ), + // Open settings dialog openSettingsHotKey(context, widget.userProfile), ]; @@ -182,7 +192,11 @@ class _HomeHotKeysState extends State { Log.info('scale the app from $currentScaleFactor to $textScale'); - ScaledWidgetsFlutterBinding.instance.scaleFactor = (_) => textScale; - await windowSizeManager.setScaleFactor(textScale); + await _scaleToSize(textScale); + } + + Future _scaleToSize(double size) async { + ScaledWidgetsFlutterBinding.instance.scaleFactor = (_) => size; + await windowSizeManager.setScaleFactor(size); } }