From 52e99bce18730dd51a7b34725f14dd0dfc86f4f8 Mon Sep 17 00:00:00 2001 From: Bo Lopker Date: Sun, 3 Nov 2024 14:02:14 +0700 Subject: [PATCH] Fix up colors for settings slider and drop icons --- lib/main.dart | 4 +++- lib/settings.dart | 11 ++++++++--- lib/table.dart | 5 ++--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index dd65bb3..c940a58 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -60,6 +60,7 @@ class HomePage extends StatefulWidget { class _HomePageState extends State { @override Widget build(BuildContext context) { + var theme = Theme.of(context); return Scaffold( body: MacMenuBar( child: ImageDropRegion( @@ -69,9 +70,10 @@ class _HomePageState extends State { }, dropOverlay: Container( color: Colors.transparent, - child: const Center( + child: Center( child: Icon( Icons.file_download, + color: theme.iconTheme.color!.withAlpha(40), size: 400, ), )).asGlass( diff --git a/lib/settings.dart b/lib/settings.dart index 50dd448..9b2ba5f 100644 --- a/lib/settings.dart +++ b/lib/settings.dart @@ -48,15 +48,20 @@ class _SettingsWidgetState extends State { initialValue: _selectedPage, clipBehavior: Clip.antiAlias, children: SettingsPages.values.fold({}, (map, element) { - map[element] = Text(element.title); + map[element] = Text(element.title, + style: TextStyle( + color: Theme.of(context).colorScheme.primary)); return map; }), decoration: BoxDecoration( - color: Colors.black, + color: Theme.of(context).colorScheme.secondaryContainer, borderRadius: BorderRadius.circular(16), ), thumbDecoration: BoxDecoration( - color: Theme.of(context).colorScheme.secondaryContainer, + color: Theme.of(context) + .colorScheme + .primaryContainer + .withOpacity(0.6), borderRadius: BorderRadius.circular(16), ), customSegmentSettings: CustomSegmentSettings( diff --git a/lib/table.dart b/lib/table.dart index 8df97d7..dc2c946 100644 --- a/lib/table.dart +++ b/lib/table.dart @@ -178,10 +178,9 @@ class _FilesTableState extends State with SignalsMixin { child: Container( decoration: BoxDecoration( borderRadius: BorderRadius.circular(20), - color: theme.focusColor, border: Border.all( - color: theme.primaryColor.withAlpha(40), - width: 2, + color: theme.iconTheme.color!.withAlpha(40), + width: 1, style: BorderStyle.solid), ), child: Icon(