diff --git a/lib/features/onboarding/welcome_tour_dialog.dart b/lib/features/onboarding/welcome_tour_dialog.dart index 293de8db..8883f82b 100644 --- a/lib/features/onboarding/welcome_tour_dialog.dart +++ b/lib/features/onboarding/welcome_tour_dialog.dart @@ -7,6 +7,7 @@ import 'package:querya_desktop/core/layout/window_layout.dart'; import 'package:querya_desktop/core/storage/app_settings.dart'; import 'package:querya_desktop/core/theme/querya_workbench_theme.dart'; import 'package:querya_desktop/shared/widgets/widgets.dart'; +import 'package:querya_desktop/core/ui/querya_control_tokens.dart'; /// Shows or toggles the interactive Welcome Tour dialog. Future showWelcomeTourDialog( @@ -261,15 +262,12 @@ class _WelcomeTourDialogState extends State { ), ), if (widget.onGoHome != null) ...[ - GhostButton( + QueryaButton.ghost( key: const Key('welcome_tour_home_button'), - density: ButtonDensity.compact, + label: 'Home', + icon: material.Icons.home_rounded, onPressed: _goHomeAndClose, - leading: const material.Icon( - material.Icons.home_rounded, - size: 16, - ), - child: const Text('Home'), + size: QueryaControlSize.sm, ), const material.SizedBox(width: 4), ], @@ -348,27 +346,28 @@ class _WelcomeTourDialogState extends State { // Action buttons if (_currentStep > 0) - OutlineButton( + QueryaButton.secondary( key: const Key('welcome_tour_prev_button'), + label: 'Back', onPressed: _previous, - child: const Text('Back'), + size: QueryaControlSize.lg, ) else - GhostButton( + QueryaButton.ghost( key: const Key('welcome_tour_skip_button'), + label: 'Skip', onPressed: _finish, - child: const Text('Skip'), + size: QueryaControlSize.lg, ), const material.SizedBox(width: 8), - PrimaryButton( + QueryaButton.primary( key: const Key('welcome_tour_next_button'), - onPressed: _next, - child: Text( - _currentStep == _totalSteps - 1 + label: _currentStep == _totalSteps - 1 ? 'Get Started' : 'Next', - ), + onPressed: _next, + size: QueryaControlSize.lg, ), ], ), @@ -695,28 +694,24 @@ class _HotkeysMatrixSlideView extends StatelessWidget { children: [ if (onLaunchDemo != null) material.Expanded( - child: OutlineButton( + child: QueryaButton.secondary( key: const Key('welcome_tour_demo_button'), + label: 'Try Demo Playground', + icon: material.Icons.play_arrow_rounded, onPressed: onLaunchDemo, - leading: const material.Icon( - material.Icons.play_arrow_rounded, - size: 18, - ), - child: const Text('Try Demo Playground'), + size: QueryaControlSize.lg, ), ), if (onLaunchDemo != null && onGoHome != null) const material.SizedBox(width: 8), if (onGoHome != null) material.Expanded( - child: GhostButton( + child: QueryaButton.ghost( key: const Key('welcome_tour_slide_home_button'), + label: 'Start Screen', + icon: material.Icons.home_rounded, onPressed: onGoHome, - leading: const material.Icon( - material.Icons.home_rounded, - size: 16, - ), - child: const Text('Start Screen'), + size: QueryaControlSize.lg, ), ), ], diff --git a/lib/features/updater/update_dialog.dart b/lib/features/updater/update_dialog.dart index 9492b0e1..295f6325 100644 --- a/lib/features/updater/update_dialog.dart +++ b/lib/features/updater/update_dialog.dart @@ -11,6 +11,7 @@ import 'package:querya_desktop/core/updater/update_manifest.dart'; import 'package:querya_desktop/features/updater/update_changelog_view.dart'; import 'package:querya_desktop/features/updater/update_controller.dart'; import 'package:querya_desktop/shared/widgets/widgets.dart'; +import 'package:querya_desktop/core/ui/querya_control_tokens.dart'; enum UpdateDialogPhase { checking, @@ -64,13 +65,15 @@ Future showUnsavedUpdateRestartDialog(material.BuildContext context) { spacing: 8, runSpacing: 8, children: [ - OutlineButton( + QueryaButton.ghost( + label: 'Cancel', onPressed: () => material.Navigator.of(ctx).pop(false), - child: const Text('Cancel'), + size: QueryaControlSize.lg, ), - DestructiveButton( + QueryaButton.destructive( + label: 'Restart anyway', onPressed: () => material.Navigator.of(ctx).pop(true), - child: const Text('Restart anyway'), + size: QueryaControlSize.lg, ), ], ), @@ -526,62 +529,72 @@ class UpdateDialogContentState extends material.State { children: [ ...switch (_phase) { UpdateDialogPhase.checking => [ - GhostButton( + QueryaButton.ghost( + label: 'Close', onPressed: () => material.Navigator.of(context).pop(), - child: const Text('Close'), + size: QueryaControlSize.lg, ), ], UpdateDialogPhase.upToDate => [ - PrimaryButton( + QueryaButton.primary( + label: 'Close', onPressed: () => material.Navigator.of(context).pop(), - child: const Text('Close'), + size: QueryaControlSize.lg, ), ], UpdateDialogPhase.available => [ - GhostButton( + QueryaButton.ghost( + label: 'Remind me later', onPressed: () => unawaited(_remindLater()), - child: const Text('Remind me later'), + size: QueryaControlSize.lg, ), const material.SizedBox(width: 8), if (_installBlocked) - PrimaryButton( + QueryaButton.primary( + label: 'Copy update command', onPressed: () => unawaited(_copyPackageCommand()), - child: const Text('Copy update command'), + size: QueryaControlSize.lg, ) else - PrimaryButton( + QueryaButton.primary( + label: 'Download', onPressed: () => unawaited(_startDownload()), - child: const Text('Download'), + size: QueryaControlSize.lg, ), ], UpdateDialogPhase.downloading => [ - GhostButton( + QueryaButton.ghost( + label: 'Cancel', onPressed: () { setState(() => _downloadCancelled = true); }, - child: const Text('Cancel'), + size: QueryaControlSize.lg, ), ], UpdateDialogPhase.readyToInstall => [ - GhostButton( + QueryaButton.ghost( + label: 'Close', onPressed: () => material.Navigator.of(context).pop(), - child: const Text('Close'), + size: QueryaControlSize.lg, ), const material.SizedBox(width: 8), - PrimaryButton( + QueryaButton.primary( + label: 'Restart & Update Now', onPressed: () => unawaited(_install()), - child: const Text('Restart & Update Now'), + size: QueryaControlSize.lg, ), ], UpdateDialogPhase.error => [ - GhostButton( + QueryaButton.ghost( + label: 'Close', onPressed: () => material.Navigator.of(context).pop(), - child: const Text('Close'), + size: QueryaControlSize.lg, ), const material.SizedBox(width: 8), - PrimaryButton( + QueryaButton.primary( + label: 'Retry', onPressed: () => unawaited(_runCheck()), - child: const Text('Retry'), + size: QueryaControlSize.lg, ), ], },