Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions lib/shared/widgets/connection_tree_loading_row.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart' as material;
import 'package:querya_desktop/core/theme/querya_theme_scope.dart';
import 'package:querya_desktop/core/ui/querya_tree_tokens.dart';
import 'package:shadcn_flutter/shadcn_flutter.dart';

import 'querya_spinner.dart';

Expand Down Expand Up @@ -38,8 +38,17 @@ class ConnectionTreeLoadingRow extends material.StatelessWidget {
customDimension: spinnerSize,
strokeWidth: strokeWidth,
),
Gap(gap),
Text(label).muted().xSmall(),
material.SizedBox(width: gap),
material.Text(
label,
style: material.DefaultTextStyle.of(context).style.copyWith(
fontSize: 12,
color: QueryaThemeScope.maybeOf(context)
?.workbench
.mutedForeground ??
material.Theme.of(context).colorScheme.onSurfaceVariant,
),
),
],
),
);
Expand Down
5 changes: 2 additions & 3 deletions lib/shared/widgets/querya_badge.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart' as material;
import 'package:shadcn_flutter/shadcn_flutter.dart';
import 'package:querya_desktop/core/theme/querya_theme_scope.dart';

/// Semantic status variant for [QueryaBadge.status].
Expand Down Expand Up @@ -106,7 +105,7 @@ class QueryaBadge extends material.StatelessWidget {

@override
material.Widget build(material.BuildContext context) {
final cs = Theme.of(context).colorScheme;
final cs = context.queryaTheme.colorScheme;
final workbench = QueryaThemeScope.maybeOf(context)?.workbench;
final palette = context.semanticPalette;

Expand Down Expand Up @@ -197,7 +196,7 @@ class QueryaBadge extends material.StatelessWidget {
),
child: effectiveIcon,
),
const Gap(4),
const material.SizedBox(width: 4),
],
material.Text(
effectiveLabel,
Expand Down
12 changes: 6 additions & 6 deletions lib/shared/widgets/querya_spinner.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart' as material;
import 'package:shadcn_flutter/shadcn_flutter.dart';
import 'package:querya_desktop/core/theme/querya_theme_scope.dart';

/// Preset sizes for the [QueryaSpinner] indicator.
Expand Down Expand Up @@ -47,12 +46,13 @@ class QueryaSpinner extends material.StatelessWidget {

@override
material.Widget build(material.BuildContext context) {
final cs = Theme.of(context).colorScheme;
final workbench = QueryaThemeScope.maybeOf(context)?.workbench;
final theme = QueryaThemeScope.maybeOf(context);
final workbench = theme?.workbench;
final fallback = material.Theme.of(context).colorScheme;

final dimension = customDimension ?? size.dimension;
final stroke = strokeWidth ?? size.strokeWidth;
final effectiveColor = color ?? workbench?.accent ?? cs.primary;
final effectiveColor = color ?? workbench?.accent ?? fallback.primary;

final spinner = material.SizedBox(
width: dimension,
Expand All @@ -72,12 +72,12 @@ class QueryaSpinner extends material.StatelessWidget {
crossAxisAlignment: material.CrossAxisAlignment.center,
children: [
spinner,
const Gap(8),
const material.SizedBox(width: 8),
material.Text(
label!,
style: material.TextStyle(
fontSize: size == QueryaSpinnerSize.sm ? 11 : 12,
color: workbench?.mutedForeground ?? cs.mutedForeground,
color: workbench?.mutedForeground ?? fallback.onSurfaceVariant,
),
),
],
Expand Down
3 changes: 0 additions & 3 deletions test/guards/shared_does_not_import_shadcn_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,15 @@ import 'package:flutter_test/flutter_test.dart';
void main() {
const allowed = <String>{
'lib/shared/widgets/app_toast.dart',
'lib/shared/widgets/connection_tree_loading_row.dart',
'lib/shared/widgets/export_menu_button.dart',
'lib/shared/widgets/querya_action_button.dart',
'lib/shared/widgets/querya_action_menu.dart',
'lib/shared/widgets/querya_badge.dart',
'lib/shared/widgets/querya_dialog_card.dart',
'lib/shared/widgets/querya_dropdown.dart',
'lib/shared/widgets/querya_empty_state.dart',
'lib/shared/widgets/querya_icon_button.dart',
'lib/shared/widgets/querya_modal_dialog.dart',
'lib/shared/widgets/querya_search_field.dart',
'lib/shared/widgets/querya_spinner.dart',
'lib/shared/widgets/querya_tab_strip.dart',
'lib/shared/widgets/widgets.dart',
};
Expand Down
Loading