diff --git a/lib/button.dart b/lib/button.dart index 0772aeb..c4be2ab 100644 --- a/lib/button.dart +++ b/lib/button.dart @@ -65,7 +65,14 @@ class SlyButtonState extends State { ); return CupertinoTheme( data: const CupertinoThemeData(brightness: Brightness.light), - child: Theme(data: ThemeData.light(), child: elevatedButton!), + child: Theme( + data: ThemeData( + colorScheme: ColorScheme.fromSwatch( + primarySwatch: Colors.grey, + brightness: Brightness.light, + ), + ), + child: elevatedButton!), ); } diff --git a/lib/editor_page.dart b/lib/editor_page.dart index 6626b8e..769fa24 100644 --- a/lib/editor_page.dart +++ b/lib/editor_page.dart @@ -16,6 +16,7 @@ import 'button.dart'; import 'slider_row.dart'; import 'switch.dart'; import 'toggle_buttons.dart'; +import 'spinner.dart'; import 'dialog.dart'; import 'snack_bar.dart'; import 'title_bar.dart'; @@ -67,7 +68,7 @@ class _SlyEditorPageState extends State { child: SizedBox( width: 24, height: 24, - child: CircularProgressIndicator.adaptive(), + child: SlySpinner(), ), ), ); @@ -333,7 +334,7 @@ class _SlyEditorPageState extends State { width: _thumbnail.width.toDouble(), height: _thumbnail.height.toDouble(), child: const Center( - child: CircularProgressIndicator.adaptive(), + child: SlySpinner(), ), ), ); @@ -356,7 +357,7 @@ class _SlyEditorPageState extends State { }, ) : const Center( - child: CircularProgressIndicator.adaptive(), + child: SlySpinner(), ), ), ); diff --git a/lib/main.dart b/lib/main.dart index 6a4400e..6411903 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -9,6 +9,7 @@ import 'package:image_picker/image_picker.dart'; import 'utils.dart'; import 'image.dart'; import 'button.dart'; +import 'spinner.dart'; import 'editor_page.dart'; import 'snack_bar.dart'; import 'title_bar.dart'; @@ -92,7 +93,7 @@ class _SlyHomePageState extends State { child: SizedBox( width: 24, height: 24, - child: CircularProgressIndicator.adaptive(), + child: SlySpinner(), ), ), ); diff --git a/lib/snack_bar.dart b/lib/snack_bar.dart index 4b83fb1..96ecc1f 100644 --- a/lib/snack_bar.dart +++ b/lib/snack_bar.dart @@ -2,6 +2,8 @@ import 'dart:ui' as ui; import 'package:flutter/material.dart'; +import 'spinner.dart'; + void showSlySnackBar( BuildContext context, String message, { @@ -36,7 +38,7 @@ void showSlySnackBar( ? const SizedBox( width: 16, height: 16, - child: CircularProgressIndicator.adaptive(), + child: SlySpinner(), ) : Container(), loading ? const SizedBox(width: 16) : Container(), diff --git a/lib/spinner.dart b/lib/spinner.dart new file mode 100644 index 0000000..ca0fd8e --- /dev/null +++ b/lib/spinner.dart @@ -0,0 +1,9 @@ +import 'package:flutter/material.dart'; + +class SlySpinner extends CircularProgressIndicator { + const SlySpinner({super.key}) + : super.adaptive( + strokeWidth: 5, + strokeCap: StrokeCap.round, + ); +}