promote the Ctrl+K theme picker into a Settings modal
The status-bar popover already handles quick theme switching, so a separate theme-only modal was redundant. Repurpose it as a general Settings surface whose first (currently only) section is Appearance: base themes, sorted, with a High-contrast toggle for -hc siblings, reusing the theme_families helpers shared with the popover. Command id stays theme.pick (the welcome theme-link and tests reference it); only the title and the view it opens change. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import 'package:clide/clide.dart';
|
||||
import 'package:clide/builtin/theme_picker/src/picker_view.dart';
|
||||
import 'package:clide/builtin/theme_picker/src/settings_view.dart';
|
||||
import 'package:clide/builtin/theme_picker/src/theme_status_item.dart';
|
||||
import 'package:clide/extension/extension.dart';
|
||||
|
||||
@@ -20,10 +20,13 @@ class ThemePickerExtension extends ClideExtension {
|
||||
|
||||
@override
|
||||
List<ContributionPoint> get contributions => [
|
||||
// Opens the settings modal (T-238). Command id kept as `theme.pick`
|
||||
// (the welcome theme-link and other callers reference it); ⌘K opens
|
||||
// Settings, whose only section today is the theme picker.
|
||||
CommandContribution(
|
||||
id: 'theme.pick',
|
||||
command: 'theme.pick',
|
||||
title: 'Theme: Pick…',
|
||||
title: 'Settings…',
|
||||
defaultBinding: 'ctrl+k',
|
||||
run: _pick,
|
||||
),
|
||||
@@ -50,7 +53,7 @@ class ThemePickerExtension extends ClideExtension {
|
||||
);
|
||||
}
|
||||
final selected = await ctx.dialog.show<String>(
|
||||
(context, dismiss) => ThemePickerView(
|
||||
(context, dismiss) => SettingsView(
|
||||
controller: ctx.theme,
|
||||
onDismiss: dismiss,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user