mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: use cmd+. to toggle sidebar on macOS (#4621)
* fix: use cmd+. to hide sidebar on macOS * fix: update missed tooltip
This commit is contained in:
@ -43,7 +43,7 @@ class HomeHotKeys extends StatelessWidget {
|
||||
// Collapse sidebar menu
|
||||
HotKeyItem(
|
||||
hotKey: HotKey(
|
||||
KeyCode.backslash,
|
||||
Platform.isMacOS ? KeyCode.period : KeyCode.backslash,
|
||||
modifiers: [Platform.isMacOS ? KeyModifier.meta : KeyModifier.control],
|
||||
// Set hotkey scope (default is HotKeyScope.system)
|
||||
scope: HotKeyScope.inapp, // Set as inapp-wide hotkey.
|
||||
|
@ -65,8 +65,7 @@ class SidebarTopMenu extends StatelessWidget {
|
||||
text: '${LocaleKeys.sideBar_closeSidebar.tr()}\n',
|
||||
),
|
||||
TextSpan(
|
||||
// TODO(Lucas.Xu): it doesn't work on macOS.
|
||||
text: Platform.isMacOS ? '⌘+\\' : 'Ctrl+\\',
|
||||
text: Platform.isMacOS ? '⌘+.' : 'Ctrl+\\',
|
||||
),
|
||||
],
|
||||
);
|
||||
|
@ -184,7 +184,7 @@ TextSpan sidebarTooltipTextSpan(BuildContext context, String hintText) =>
|
||||
text: "$hintText\n",
|
||||
),
|
||||
TextSpan(
|
||||
text: Platform.isMacOS ? "⌘+\\" : "Ctrl+\\",
|
||||
text: Platform.isMacOS ? "⌘+." : "Ctrl+\\",
|
||||
),
|
||||
],
|
||||
);
|
||||
|
Reference in New Issue
Block a user