fix(studio): Cmd+; opens Settings (Cmd+, is reserved by macOS) (v0.12.1)
Operator reported Cmd+, doing nothing. macOS reserves Cmd+, for the native app-Preferences menu item which Flutter Desktop doesn't wire up — the keystroke is captured by the OS before the Shortcuts widget sees it. Adds Cmd+; as the working alternative; keeps Cmd+, registered too so a future Flutter version (or a native-menu setup) can light it up. Tooltip on the sidebar gear icon now reads "Settings (⌘;)" so the discoverable affordance also tells you the shortcut. Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
15ea403c86
commit
88c5f2da1f
3 changed files with 13 additions and 5 deletions
|
|
@ -23,7 +23,7 @@ import 'widgets/widgets.dart';
|
||||||
/// Studio's own build version. Bump on every UI commit so the
|
/// Studio's own build version. Bump on every UI commit so the
|
||||||
/// running app self-identifies — visible in the sidebar header
|
/// running app self-identifies — visible in the sidebar header
|
||||||
/// and quick-glance proof that you're seeing the current build.
|
/// and quick-glance proof that you're seeing the current build.
|
||||||
const String kStudioVersion = '0.12.0';
|
const String kStudioVersion = '0.12.1';
|
||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
|
@ -185,7 +185,15 @@ class _StudioShellState extends State<StudioShell> {
|
||||||
LogicalKeyboardKey(LogicalKeyboardKey.digit1.keyId + i),
|
LogicalKeyboardKey(LogicalKeyboardKey.digit1.keyId + i),
|
||||||
meta: true,
|
meta: true,
|
||||||
): _GoToPageIntent(i),
|
): _GoToPageIntent(i),
|
||||||
// Cmd+, opens the settings dialog (macOS convention).
|
// Settings dialog. macOS reserves Cmd+, for the native
|
||||||
|
// app-Preferences menu item, which Flutter Desktop
|
||||||
|
// doesn't wire up — the keystroke is captured by the OS
|
||||||
|
// before it reaches our Shortcuts widget. Cmd+; is the
|
||||||
|
// working alternative; we register Cmd+, too for
|
||||||
|
// completeness in case a future Flutter version (or a
|
||||||
|
// native-menu setup) lets it through.
|
||||||
|
const SingleActivator(LogicalKeyboardKey.semicolon, meta: true):
|
||||||
|
const _OpenSettingsIntent(),
|
||||||
const SingleActivator(LogicalKeyboardKey.comma, meta: true):
|
const SingleActivator(LogicalKeyboardKey.comma, meta: true):
|
||||||
const _OpenSettingsIntent(),
|
const _OpenSettingsIntent(),
|
||||||
},
|
},
|
||||||
|
|
@ -335,7 +343,7 @@ class _Sidebar extends StatelessWidget {
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Icons.settings_outlined, size: 16),
|
icon: const Icon(Icons.settings_outlined, size: 16),
|
||||||
tooltip: 'Hub endpoint…',
|
tooltip: 'Settings (⌘;)',
|
||||||
visualDensity: VisualDensity.compact,
|
visualDensity: VisualDensity.compact,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final saved = await FaiSettingsDialog.show(context);
|
final saved = await FaiSettingsDialog.show(context);
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ packages:
|
||||||
path: "../fai_dart_sdk"
|
path: "../fai_dart_sdk"
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "0.4.0"
|
version: "0.5.0"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
name: fai_studio
|
name: fai_studio
|
||||||
description: "F∆I Studio — desktop GUI for the F∆I hub"
|
description: "F∆I Studio — desktop GUI for the F∆I hub"
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 0.12.0
|
version: 0.12.1
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.11.0-200.1.beta
|
sdk: ^3.11.0-200.1.beta
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue