From 079841f61a34157c47dc47a0b5e9f5470949c60e Mon Sep 17 00:00:00 2001 From: Noah Date: Fri, 15 Mar 2024 10:34:29 +0100 Subject: [PATCH 1/2] rewrite background to surface --- lib/src/view/engine/engine_gauge.dart | 8 ++++---- lib/src/view/puzzle/puzzle_dashboard_widget.dart | 3 +-- lib/src/widgets/board_table.dart | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/src/view/engine/engine_gauge.dart b/lib/src/view/engine/engine_gauge.dart index a4e5b40485..22f9050545 100644 --- a/lib/src/view/engine/engine_gauge.dart +++ b/lib/src/view/engine/engine_gauge.dart @@ -52,8 +52,8 @@ class EngineGauge extends ConsumerWidget { Theme.of(context).platform == TargetPlatform.iOS ? _kEvalGaugeBackgroundColor : brightness == Brightness.dark - ? lighten(Theme.of(context).colorScheme.background, .07) - : lighten(Theme.of(context).colorScheme.onBackground, .17); + ? lighten(Theme.of(context).colorScheme.surface, .07) + : lighten(Theme.of(context).colorScheme.onSurface, .17); static Color valueColor(BuildContext context, Brightness brightness) => Theme.of(context).platform == TargetPlatform.iOS @@ -61,8 +61,8 @@ class EngineGauge extends ConsumerWidget { ? _kEvalGaugeValueColorDarkBg : _kEvalGaugeValueColorLightBg : brightness == Brightness.dark - ? darken(Theme.of(context).colorScheme.onBackground, .03) - : darken(Theme.of(context).colorScheme.background, .01); + ? darken(Theme.of(context).colorScheme.onSurface, .03) + : darken(Theme.of(context).colorScheme.surface, .01); @override Widget build(BuildContext context, WidgetRef ref) { diff --git a/lib/src/view/puzzle/puzzle_dashboard_widget.dart b/lib/src/view/puzzle/puzzle_dashboard_widget.dart index 0cdfe5ac90..23e7faefec 100644 --- a/lib/src/view/puzzle/puzzle_dashboard_widget.dart +++ b/lib/src/view/puzzle/puzzle_dashboard_widget.dart @@ -143,8 +143,7 @@ class PuzzleChart extends StatelessWidget { @override Widget build(BuildContext context) { - final radarColor = - Theme.of(context).colorScheme.onBackground.withOpacity(0.5); + final radarColor = Theme.of(context).colorScheme.onSurface.withOpacity(0.5); final chartColor = Theme.of(context).colorScheme.tertiary; return RadarChart( RadarChartData( diff --git a/lib/src/widgets/board_table.dart b/lib/src/widgets/board_table.dart index dba6815373..7485530fcb 100644 --- a/lib/src/widgets/board_table.dart +++ b/lib/src/widgets/board_table.dart @@ -120,7 +120,7 @@ class BoardTable extends ConsumerWidget { color: Theme.of(context).platform == TargetPlatform.iOS ? CupertinoColors.secondarySystemBackground .resolveFrom(context) - : Theme.of(context).colorScheme.background, + : Theme.of(context).colorScheme.surface, borderRadius: const BorderRadius.all(Radius.circular(10.0)), ), From e81d33a71bd260660176a316258b16065f2b141c Mon Sep 17 00:00:00 2001 From: Noah Date: Fri, 15 Mar 2024 11:01:15 +0100 Subject: [PATCH 2/2] change surfacevariant to tertiary color with low opacity --- lib/src/view/play/time_control_modal.dart | 2 +- lib/src/widgets/feedback.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/view/play/time_control_modal.dart b/lib/src/view/play/time_control_modal.dart index 5b993b2444..16c431ac73 100644 --- a/lib/src/view/play/time_control_modal.dart +++ b/lib/src/view/play/time_control_modal.dart @@ -183,7 +183,7 @@ class _ChoiceChip extends StatelessWidget { color: Theme.of(context).platform == TargetPlatform.iOS ? CupertinoColors.secondarySystemGroupedBackground .resolveFrom(context) - : Theme.of(context).colorScheme.surfaceVariant, + : Theme.of(context).colorScheme.tertiary.withOpacity(0.15), borderRadius: const BorderRadius.all(Radius.circular(5.0)), border: selected ? Border.fromBorderSide( diff --git a/lib/src/widgets/feedback.dart b/lib/src/widgets/feedback.dart index 474b66c824..1d549ca78b 100644 --- a/lib/src/widgets/feedback.dart +++ b/lib/src/widgets/feedback.dart @@ -23,7 +23,7 @@ class ConnectivityBanner extends ConsumerWidget { height: 45, color: theme.platform == TargetPlatform.iOS ? cupertinoTheme.barBackgroundColor - : theme.colorScheme.surfaceVariant, + : theme.colorScheme.tertiary.withOpacity(0.15), child: Padding( padding: const EdgeInsets.symmetric(horizontal: 8.0), child: Row(