From 22346362a67a403d6036fe79da5d0fdefbca9f0b Mon Sep 17 00:00:00 2001 From: Juan Gilsanz Polo Date: Sat, 5 Nov 2022 02:35:35 +0100 Subject: [PATCH] More UI changes --- lib/config/theme.dart | 54 +++++++++++-------- .../app_logs/app_log_details_modal.dart | 12 +++-- lib/screens/app_logs/app_logs.dart | 18 ++++++- lib/screens/clients/added_list.dart | 2 +- lib/screens/clients/client_screen.dart | 8 +-- lib/screens/clients/clients.dart | 2 +- lib/screens/clients/fab.dart | 4 +- lib/screens/clients/options_modal.dart | 22 +++++--- lib/screens/clients/remove_client_modal.dart | 2 +- lib/screens/clients/services_modal.dart | 2 +- lib/screens/clients/tags_modal.dart | 2 +- lib/screens/connect/fab.dart | 3 +- lib/screens/filters/add_custom_rule.dart | 24 +++++++-- lib/screens/filters/add_list_modal.dart | 2 +- .../filters/blocked_services_modal.dart | 2 +- lib/screens/filters/check_host_modal.dart | 2 +- lib/screens/filters/delete_list_modal.dart | 2 +- lib/screens/filters/fab.dart | 4 +- lib/screens/filters/filter_list_tile.dart | 4 +- lib/screens/filters/filters.dart | 2 +- lib/screens/filters/list_details_screen.dart | 4 +- .../filters/remove_custom_rule_modal.dart | 2 +- .../filters/update_interval_lists_modal.dart | 2 +- lib/screens/home/appbar.dart | 2 +- lib/screens/home/fab.dart | 4 +- lib/screens/home/management_modal.dart | 4 +- lib/screens/logs/filter_status_modal.dart | 4 +- lib/screens/logs/log_details_screen.dart | 8 +-- lib/screens/logs/log_list_tile.dart | 4 +- lib/screens/logs/log_tile.dart | 22 ++++---- lib/screens/logs/logs_config_modal.dart | 2 +- lib/screens/logs/logs_filters_modal.dart | 2 +- lib/screens/servers/servers.dart | 4 +- .../access_settings/access_settings.dart | 4 +- .../access_settings/add_client_modal.dart | 2 +- .../access_settings/clients_list.dart | 14 +++-- .../settings/dhcp/add_static_lease_modal.dart | 18 ++++--- .../dhcp/delete_static_lease_modal.dart | 17 ++++-- lib/screens/settings/dhcp/dhcp.dart | 2 +- lib/screens/settings/dhcp/dhcp_leases.dart | 3 +- .../settings/dhcp/select_interface_modal.dart | 2 +- lib/screens/settings/dns/bootstrap_dns.dart | 2 +- .../settings/dns/private_reverse_servers.dart | 2 +- .../dns_rewrites/add_dns_rewrite_modal.dart | 2 +- .../settings/dns_rewrites/dns_rewrites.dart | 3 +- .../settings/encryption/encryption.dart | 2 +- .../settings/encryption/master_switch.dart | 2 +- .../server_info/dns_addresses_modal.dart | 4 +- lib/screens/top_items/top_items.dart | 2 +- lib/widgets/add_server_modal.dart | 20 ++++--- lib/widgets/custom_list_tile.dart | 4 +- lib/widgets/custom_radio_list_tile.dart | 2 +- lib/widgets/custom_switch_list_tile.dart | 4 +- lib/widgets/servers_list/delete_modal.dart | 2 +- lib/widgets/servers_list/servers_list.dart | 4 +- lib/widgets/update_modal.dart | 2 +- 56 files changed, 217 insertions(+), 139 deletions(-) diff --git a/lib/config/theme.dart b/lib/config/theme.dart index b3721f8..532c4c8 100644 --- a/lib/config/theme.dart +++ b/lib/config/theme.dart @@ -33,8 +33,8 @@ ThemeData lightTheme(ColorScheme? dynamicColorScheme) => ThemeData( ) ), floatingActionButtonTheme: FloatingActionButtonThemeData( - foregroundColor: Colors.white, - backgroundColor: dynamicColorScheme != null ? dynamicColorScheme.primary : adguardGreenColor + foregroundColor: dynamicColorScheme != null ? dynamicColorScheme.onPrimaryContainer : Colors.white, + backgroundColor: dynamicColorScheme != null ? dynamicColorScheme.primaryContainer : adguardGreenColor ), textButtonTheme: TextButtonThemeData( style: ButtonStyle( @@ -47,9 +47,10 @@ ThemeData lightTheme(ColorScheme? dynamicColorScheme) => ThemeData( ), ), dividerColor: Colors.black12, - listTileTheme: const ListTileThemeData( + listTileTheme: ListTileThemeData( tileColor: Colors.transparent, - iconColor: Color.fromRGBO(138, 138, 138, 1), + textColor: dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(117, 117, 117, 1), + iconColor: dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(117, 117, 117, 1), ), checkboxTheme: CheckboxThemeData( checkColor: MaterialStateProperty.all(Colors.white), @@ -102,8 +103,8 @@ ThemeData darkTheme(ColorScheme? dynamicColorScheme) => ThemeData( elevation: 4, ), floatingActionButtonTheme: FloatingActionButtonThemeData( - foregroundColor: Colors.white, - backgroundColor: dynamicColorScheme != null ? dynamicColorScheme.primary : adguardGreenColor + foregroundColor: dynamicColorScheme != null ? dynamicColorScheme.onPrimaryContainer : Colors.white, + backgroundColor: dynamicColorScheme != null ? dynamicColorScheme.primaryContainer : adguardGreenColor ), textButtonTheme: TextButtonThemeData( style: ButtonStyle( @@ -125,14 +126,17 @@ ThemeData darkTheme(ColorScheme? dynamicColorScheme) => ThemeData( ), ), dividerColor: Colors.white12, - listTileTheme: const ListTileThemeData( + listTileTheme: ListTileThemeData( tileColor: Colors.transparent, - iconColor: Color.fromRGBO(187, 187, 187, 1), + textColor: dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(187, 187, 187, 1), + iconColor: dynamicColorScheme != null ? dynamicColorScheme.onSurfaceVariant : const Color.fromRGBO(187, 187, 187, 1), ), checkboxTheme: CheckboxThemeData( - checkColor: MaterialStateProperty.all(Colors.white), + checkColor: MaterialStateProperty.all( + dynamicColorScheme != null ? dynamicColorScheme.onPrimary : Colors.white + ), fillColor: MaterialStateProperty.all( - dynamicColorScheme != null ? dynamicColorScheme.primary : adguardGreenColor + dynamicColorScheme != null ? dynamicColorScheme.onSurface : adguardGreenColor ), ), tabBarTheme: TabBarTheme( @@ -197,6 +201,9 @@ ThemeData lightThemeOldVersions(MaterialColor primaryColor) => ThemeData( overlayColor: MaterialStateProperty.all(primaryColor.shade50), ) ), + cardTheme: CardTheme( + surfaceTintColor: primaryColor + ), navigationBarTheme: NavigationBarThemeData( surfaceTintColor: primaryColor, indicatorColor: primaryColor @@ -220,11 +227,12 @@ ThemeData lightThemeOldVersions(MaterialColor primaryColor) => ThemeData( dividerColor: Colors.black12, listTileTheme: const ListTileThemeData( tileColor: Colors.transparent, - iconColor: Color.fromRGBO(138, 138, 138, 1), + textColor: Color.fromRGBO(117, 117, 117, 1), + iconColor: Color.fromRGBO(117, 117, 117, 1), ), checkboxTheme: CheckboxThemeData( checkColor: MaterialStateProperty.all(Colors.white), - fillColor: MaterialStateProperty.all(primaryColor), + fillColor: MaterialStateProperty.all(primaryColor), ), tabBarTheme: TabBarTheme( unselectedLabelColor: Colors.black, @@ -260,7 +268,7 @@ ThemeData darkThemeOldVersions(MaterialColor primaryColor) => ThemeData( ) ), appBarTheme: AppBarTheme( - color: Color.fromRGBO(18, 18, 18, 1), + color: const Color.fromRGBO(18, 18, 18, 1), foregroundColor: Colors.white, elevation: 0, surfaceTintColor: primaryColor @@ -293,6 +301,9 @@ ThemeData darkThemeOldVersions(MaterialColor primaryColor) => ThemeData( overlayColor: MaterialStateProperty.all(primaryColor.shade50), ) ), + cardTheme: CardTheme( + surfaceTintColor: primaryColor + ), inputDecorationTheme: InputDecorationTheme( floatingLabelStyle: TextStyle( color: primaryColor @@ -305,6 +316,15 @@ ThemeData darkThemeOldVersions(MaterialColor primaryColor) => ThemeData( ) ) ), + checkboxTheme: CheckboxThemeData( + checkColor: MaterialStateProperty.all(Colors.white), + fillColor: MaterialStateProperty.all(primaryColor), + ), + listTileTheme: const ListTileThemeData( + tileColor: Colors.transparent, + textColor: Color.fromRGBO(187, 187, 187, 1), + iconColor: Color.fromRGBO(187, 187, 187, 1), + ), textSelectionTheme: TextSelectionThemeData( cursorColor: primaryColor ), @@ -318,14 +338,6 @@ ThemeData darkThemeOldVersions(MaterialColor primaryColor) => ThemeData( ), ), dividerColor: Colors.white12, - listTileTheme: const ListTileThemeData( - tileColor: Colors.transparent, - iconColor: Color.fromRGBO(187, 187, 187, 1), - ), - checkboxTheme: CheckboxThemeData( - checkColor: MaterialStateProperty.all(Colors.white), - fillColor: MaterialStateProperty.all(Colors.blue), - ), tabBarTheme: TabBarTheme( unselectedLabelColor: Colors.white, labelColor: primaryColor, diff --git a/lib/screens/app_logs/app_log_details_modal.dart b/lib/screens/app_logs/app_log_details_modal.dart index ed47d8f..70368cf 100644 --- a/lib/screens/app_logs/app_log_details_modal.dart +++ b/lib/screens/app_logs/app_log_details_modal.dart @@ -43,16 +43,18 @@ class _AppLogDetailsModalState extends State { return AlertDialog( title: Column( children: [ - const Icon( + Icon( Icons.description_rounded, - size: 26, + size: 24, + color: Theme.of(context).listTileTheme.iconColor, ), - const SizedBox(height: 20), + const SizedBox(height: 16), Text( AppLocalizations.of(context)!.logDetails, textAlign: TextAlign.center, - style: const TextStyle( - fontSize: 24 + style: TextStyle( + fontSize: 24, + color: Theme.of(context).colorScheme.onSurface ), ) ], diff --git a/lib/screens/app_logs/app_logs.dart b/lib/screens/app_logs/app_logs.dart index 78c3f34..05d3ec0 100644 --- a/lib/screens/app_logs/app_logs.dart +++ b/lib/screens/app_logs/app_logs.dart @@ -50,8 +50,22 @@ class AppLogs extends StatelessWidget { padding: const EdgeInsets.only(top: 0), itemCount: appConfigProvider.logs.length, itemBuilder: (context, index) => ListTile( - title: Text(appConfigProvider.logs[index].message), - subtitle: Text(appConfigProvider.logs[index].dateTime.toString()), + title: Text( + appConfigProvider.logs[index].message, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.normal, + color: Theme.of(context).colorScheme.onSurface + ), + ), + subtitle: Text( + appConfigProvider.logs[index].dateTime.toString(), + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: Theme.of(context).listTileTheme.textColor + ), + ), trailing: Text(appConfigProvider.logs[index].type), onTap: () => { showDialog( diff --git a/lib/screens/clients/added_list.dart b/lib/screens/clients/added_list.dart index 566a2c3..29881ba 100644 --- a/lib/screens/clients/added_list.dart +++ b/lib/screens/clients/added_list.dart @@ -220,7 +220,7 @@ class _AddedListState extends State { Text( widget.data[index].ids.toString().replaceAll(RegExp(r'^\[|\]$'), ''), style: TextStyle( - color: Theme.of(context).colorScheme.onSurfaceVariant + color: Theme.of(context).listTileTheme.textColor ), ), const SizedBox(height: 7), diff --git a/lib/screens/clients/client_screen.dart b/lib/screens/clients/client_screen.dart index 080a1f5..8979dc5 100644 --- a/lib/screens/clients/client_screen.dart +++ b/lib/screens/clients/client_screen.dart @@ -322,7 +322,7 @@ class _ClientScreenState extends State { children: [ Icon( Icons.label_rounded, - color: Theme.of(context).colorScheme.onSurfaceVariant + color: Theme.of(context).listTileTheme.iconColor ), const SizedBox(width: 16), Column( @@ -341,7 +341,7 @@ class _ClientScreenState extends State { ? "${selectedTags.length} ${AppLocalizations.of(context)!.tagsSelected}" : AppLocalizations.of(context)!.noTagsSelected, style: TextStyle( - color: Theme.of(context).colorScheme.onSurfaceVariant + color: Theme.of(context).listTileTheme.iconColor ), ) ], @@ -540,7 +540,7 @@ class _ClientScreenState extends State { Icon( Icons.public, color: useGlobalSettingsServices == false - ? Theme.of(context).colorScheme.onSurface + ? Theme.of(context).listTileTheme.iconColor : Theme.of(context).colorScheme.onSurface.withOpacity(0.38), ), const SizedBox(width: 16), @@ -563,7 +563,7 @@ class _ClientScreenState extends State { ? "${blockedServices.length} ${AppLocalizations.of(context)!.servicesBlocked}" : AppLocalizations.of(context)!.noBlockedServicesSelected, style: TextStyle( - color: Theme.of(context).colorScheme.onSurfaceVariant + color: Theme.of(context).listTileTheme.iconColor ), ) ] diff --git a/lib/screens/clients/clients.dart b/lib/screens/clients/clients.dart index 5401d2c..f411da9 100644 --- a/lib/screens/clients/clients.dart +++ b/lib/screens/clients/clients.dart @@ -143,7 +143,7 @@ class _ClientsWidgetState extends State with TickerProviderStateM color: Theme.of(context).scaffoldBackgroundColor, border: Border( top: BorderSide( - color: Theme.of(context).colorScheme.surfaceVariant + color: Theme.of(context).colorScheme.onSurface.withOpacity(0.1) ) ) ), diff --git a/lib/screens/clients/fab.dart b/lib/screens/clients/fab.dart index fc8932f..97ae592 100644 --- a/lib/screens/clients/fab.dart +++ b/lib/screens/clients/fab.dart @@ -69,10 +69,10 @@ class ClientsFab extends StatelessWidget { return FloatingActionButton( onPressed: () => openAddClient(), - backgroundColor: Theme.of(context).colorScheme.primaryContainer, + backgroundColor: Theme.of(context).floatingActionButtonTheme.backgroundColor, child: Icon( Icons.add, - color: Theme.of(context).colorScheme.onPrimaryContainer, + color: Theme.of(context).floatingActionButtonTheme.foregroundColor, ), ); } diff --git a/lib/screens/clients/options_modal.dart b/lib/screens/clients/options_modal.dart index 6e1faca..eed56fa 100644 --- a/lib/screens/clients/options_modal.dart +++ b/lib/screens/clients/options_modal.dart @@ -20,9 +20,17 @@ class OptionsModal extends StatelessWidget { ), title: Column( children: [ - const Icon(Icons.more_horiz), + Icon( + Icons.more_horiz, + color: Theme.of(context).listTileTheme.iconColor + ), const SizedBox(height: 16), - Text(AppLocalizations.of(context)!.options) + Text( + AppLocalizations.of(context)!.options, + style: TextStyle( + color: Theme.of(context).colorScheme.onSurface + ), + ) ], ), content: Column( @@ -37,12 +45,13 @@ class OptionsModal extends StatelessWidget { title: Text( AppLocalizations.of(context)!.edit, style: TextStyle( - color: Theme.of(context).colorScheme.onSurface + color: Theme.of(context).colorScheme.onSurface, + fontWeight: FontWeight.normal ), ), leading: Icon( Icons.edit, - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.iconColor, ), ), ListTile( @@ -53,12 +62,13 @@ class OptionsModal extends StatelessWidget { title: Text( AppLocalizations.of(context)!.delete, style: TextStyle( - color: Theme.of(context).colorScheme.onSurface + color: Theme.of(context).colorScheme.onSurface, + fontWeight: FontWeight.normal ), ), leading: Icon( Icons.delete, - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.iconColor, ), ), ], diff --git a/lib/screens/clients/remove_client_modal.dart b/lib/screens/clients/remove_client_modal.dart index eeeda46..4427d22 100644 --- a/lib/screens/clients/remove_client_modal.dart +++ b/lib/screens/clients/remove_client_modal.dart @@ -17,7 +17,7 @@ class RemoveClientModal extends StatelessWidget { Icon( Icons.delete_rounded, size: 24, - color: Theme.of(context).colorScheme.secondary + color: Theme.of(context).listTileTheme.iconColor ), const SizedBox(height: 16), Text( diff --git a/lib/screens/clients/services_modal.dart b/lib/screens/clients/services_modal.dart index f7f9761..974c565 100644 --- a/lib/screens/clients/services_modal.dart +++ b/lib/screens/clients/services_modal.dart @@ -51,7 +51,7 @@ class _ServicesModalState extends State { children: [ Icon( Icons.public, - color: Theme.of(context).colorScheme.onSurface, + color: Theme.of(context).listTileTheme.iconColor ), const SizedBox(height: 16), Text( diff --git a/lib/screens/clients/tags_modal.dart b/lib/screens/clients/tags_modal.dart index ceeeb83..fbc1c1b 100644 --- a/lib/screens/clients/tags_modal.dart +++ b/lib/screens/clients/tags_modal.dart @@ -51,7 +51,7 @@ class _TagsModalState extends State { children: [ Icon( Icons.label_rounded, - color: Theme.of(context).colorScheme.onSurface + color: Theme.of(context).listTileTheme.iconColor ), const SizedBox(height: 16), Text( diff --git a/lib/screens/connect/fab.dart b/lib/screens/connect/fab.dart index c83f94f..61b1144 100644 --- a/lib/screens/connect/fab.dart +++ b/lib/screens/connect/fab.dart @@ -17,9 +17,10 @@ class FabConnect extends StatelessWidget { return FloatingActionButton( onPressed: openAddServerModal, + backgroundColor: Theme.of(context).floatingActionButtonTheme.backgroundColor, child: Icon( Icons.add_rounded, - color: Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white, + color: Theme.of(context).floatingActionButtonTheme.foregroundColor, ), ); } diff --git a/lib/screens/filters/add_custom_rule.dart b/lib/screens/filters/add_custom_rule.dart index 032c5d7..a3b70b1 100644 --- a/lib/screens/filters/add_custom_rule.dart +++ b/lib/screens/filters/add_custom_rule.dart @@ -1,9 +1,11 @@ import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; +import 'package:provider/provider.dart'; import 'package:material_segmented_control/material_segmented_control.dart'; import 'package:flutter_web_browser/flutter_web_browser.dart'; import 'package:adguard_home_manager/constants/urls.dart'; +import 'package:adguard_home_manager/providers/app_config_provider.dart'; class AddCustomRule extends StatefulWidget { final void Function(String) onConfirm; @@ -88,11 +90,17 @@ class _AddCustomRuleState extends State { @override Widget build(BuildContext context) { + final appConfigProvider = Provider.of(context); + Map presets = { 0: Text( AppLocalizations.of(context)!.block, style: TextStyle( - color: Theme.of(context).colorScheme.onSurface, + color: appConfigProvider.useDynamicColor == true + ? Theme.of(context).floatingActionButtonTheme.foregroundColor! + : preset == 0 + ? Colors.white + : Theme.of(context).primaryColor, fontSize: 14, fontWeight: FontWeight.w500 ), @@ -100,7 +108,11 @@ class _AddCustomRuleState extends State { 1: Text( AppLocalizations.of(context)!.unblock, style: TextStyle( - color: Theme.of(context).colorScheme.onSurface, + color: appConfigProvider.useDynamicColor == true + ? Theme.of(context).floatingActionButtonTheme.foregroundColor! + : preset == 1 + ? Colors.white + : Theme.of(context).primaryColor, fontSize: 14, fontWeight: FontWeight.w500 ), @@ -108,7 +120,11 @@ class _AddCustomRuleState extends State { 2: Text( AppLocalizations.of(context)!.custom, style: TextStyle( - color: Theme.of(context).colorScheme.onSurface, + color: appConfigProvider.useDynamicColor == true + ? Theme.of(context).floatingActionButtonTheme.foregroundColor! + : preset == 2 + ? Colors.white + : Theme.of(context).primaryColor, fontSize: 14, fontWeight: FontWeight.w500 ), @@ -172,7 +188,7 @@ class _AddCustomRuleState extends State { children: presets, selectionIndex: preset, onSegmentChosen: (value) => setState(() => preset = value), - selectedColor: Theme.of(context).colorScheme.secondaryContainer, + selectedColor: Theme.of(context).floatingActionButtonTheme.backgroundColor!, unselectedColor: Colors.transparent, borderColor: Theme.of(context).colorScheme.onSurface, ), diff --git a/lib/screens/filters/add_list_modal.dart b/lib/screens/filters/add_list_modal.dart index 8721803..d76d55b 100644 --- a/lib/screens/filters/add_list_modal.dart +++ b/lib/screens/filters/add_list_modal.dart @@ -92,7 +92,7 @@ class _AddListModalState extends State { ? Icons.verified_user_rounded : Icons.gpp_bad_rounded, size: 24, - color: Theme.of(context).colorScheme.secondary, + color: Theme.of(context).listTileTheme.iconColor ), ), const SizedBox(height: 16), diff --git a/lib/screens/filters/blocked_services_modal.dart b/lib/screens/filters/blocked_services_modal.dart index e513477..e724295 100644 --- a/lib/screens/filters/blocked_services_modal.dart +++ b/lib/screens/filters/blocked_services_modal.dart @@ -76,7 +76,7 @@ class _BlockedServicesModalState extends State { child: Icon( Icons.block, size: 24, - color: Theme.of(context).colorScheme.secondary, + color: Theme.of(context).listTileTheme.iconColor ), ), const SizedBox(height: 16), diff --git a/lib/screens/filters/check_host_modal.dart b/lib/screens/filters/check_host_modal.dart index 4a37881..6e8e3b9 100644 --- a/lib/screens/filters/check_host_modal.dart +++ b/lib/screens/filters/check_host_modal.dart @@ -143,7 +143,7 @@ class _CheckHostModalState extends State { child: Icon( Icons.shield_rounded, size: 24, - color: Theme.of(context).colorScheme.secondary, + color: Theme.of(context).listTileTheme.iconColor ), ), const SizedBox(height: 16), diff --git a/lib/screens/filters/delete_list_modal.dart b/lib/screens/filters/delete_list_modal.dart index 022c962..5d751e4 100644 --- a/lib/screens/filters/delete_list_modal.dart +++ b/lib/screens/filters/delete_list_modal.dart @@ -17,7 +17,7 @@ class DeleteListModal extends StatelessWidget { Icon( Icons.delete_rounded, size: 24, - color: Theme.of(context).colorScheme.secondary, + color: Theme.of(context).listTileTheme.iconColor ), const SizedBox(height: 16), Text( diff --git a/lib/screens/filters/fab.dart b/lib/screens/filters/fab.dart index c65cbb2..ee6b121 100644 --- a/lib/screens/filters/fab.dart +++ b/lib/screens/filters/fab.dart @@ -168,10 +168,10 @@ class FiltersFab extends StatelessWidget { onPressed: type == 'blacklist' || type == 'whitelist' ? () => openAddWhitelistBlacklist() : () => openAddCustomRule(), - backgroundColor: Theme.of(context).colorScheme.primaryContainer, + backgroundColor: Theme.of(context).floatingActionButtonTheme.backgroundColor, child: Icon( Icons.add, - color: Theme.of(context).colorScheme.onPrimaryContainer, + color: Theme.of(context).floatingActionButtonTheme.foregroundColor, ), ); } diff --git a/lib/screens/filters/filter_list_tile.dart b/lib/screens/filters/filter_list_tile.dart index 775472e..1782d62 100644 --- a/lib/screens/filters/filter_list_tile.dart +++ b/lib/screens/filters/filter_list_tile.dart @@ -26,7 +26,7 @@ class FilterListTile extends StatelessWidget { Icon( icon, size: 24, - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.iconColor, ), const SizedBox(width: 16), Flexible( @@ -46,7 +46,7 @@ class FilterListTile extends StatelessWidget { subtitle, style: TextStyle( fontSize: 14, - color: color ?? Theme.of(context).colorScheme.onSurfaceVariant, + color: color ?? Theme.of(context).listTileTheme.textColor, fontWeight: bold == true ? FontWeight.bold : FontWeight.w400 ), ), diff --git a/lib/screens/filters/filters.dart b/lib/screens/filters/filters.dart index 1b782a4..de0d3d5 100644 --- a/lib/screens/filters/filters.dart +++ b/lib/screens/filters/filters.dart @@ -393,7 +393,7 @@ class _FiltersWidgetState extends State with TickerProviderStateM color: Theme.of(context).scaffoldBackgroundColor, border: Border( top: BorderSide( - color: Theme.of(context).colorScheme.surfaceVariant + color: Theme.of(context).colorScheme.onSurface.withOpacity(0.1) ) ) ), diff --git a/lib/screens/filters/list_details_screen.dart b/lib/screens/filters/list_details_screen.dart index 52ee4ff..95c26fb 100644 --- a/lib/screens/filters/list_details_screen.dart +++ b/lib/screens/filters/list_details_screen.dart @@ -306,12 +306,12 @@ class _ListDetailsScreenState extends State { right: 20, child: FloatingActionButton( onPressed: () => enableDisableList(widget.list, !enabled), - backgroundColor: Theme.of(context).colorScheme.primaryContainer, + backgroundColor: Theme.of(context).floatingActionButtonTheme.backgroundColor, child: Icon( enabled == true ? Icons.gpp_bad_rounded : Icons.verified_user_rounded, - color: Theme.of(context).colorScheme.onPrimaryContainer, + color: Theme.of(context).floatingActionButtonTheme.foregroundColor, ), ), ) diff --git a/lib/screens/filters/remove_custom_rule_modal.dart b/lib/screens/filters/remove_custom_rule_modal.dart index 7985104..f1c4352 100644 --- a/lib/screens/filters/remove_custom_rule_modal.dart +++ b/lib/screens/filters/remove_custom_rule_modal.dart @@ -17,7 +17,7 @@ class RemoveCustomRule extends StatelessWidget { Icon( Icons.shield_rounded, size: 24, - color: Theme.of(context).colorScheme.secondary + color: Theme.of(context).listTileTheme.iconColor ), const SizedBox(height: 16), Text( diff --git a/lib/screens/filters/update_interval_lists_modal.dart b/lib/screens/filters/update_interval_lists_modal.dart index 41f43a8..cc7d8f9 100644 --- a/lib/screens/filters/update_interval_lists_modal.dart +++ b/lib/screens/filters/update_interval_lists_modal.dart @@ -64,7 +64,7 @@ class _UpdateIntervalListsModalState extends State { child: Icon( Icons.update_rounded, size: 24, - color: Theme.of(context).colorScheme.secondary, + color: Theme.of(context).listTileTheme.iconColor ), ), Container( diff --git a/lib/screens/home/appbar.dart b/lib/screens/home/appbar.dart index f899b05..b4ceb71 100644 --- a/lib/screens/home/appbar.dart +++ b/lib/screens/home/appbar.dart @@ -86,7 +86,7 @@ class HomeAppBar extends StatelessWidget with PreferredSizeWidget { "${server.connectionMethod}://${server.domain}${server.path ?? ""}${server.port != null ? ':${server.port}' : ""}", style: TextStyle( fontSize: 14, - color: Theme.of(context).colorScheme.onSurfaceVariant + color: Theme.of(context).listTileTheme.textColor ), ) ], diff --git a/lib/screens/home/fab.dart b/lib/screens/home/fab.dart index c506318..d976168 100644 --- a/lib/screens/home/fab.dart +++ b/lib/screens/home/fab.dart @@ -24,10 +24,10 @@ class HomeFab extends StatelessWidget { return serversProvider.serverStatus.loadStatus == 1 ? FloatingActionButton( onPressed: openManagementBottomSheet, - backgroundColor: Theme.of(context).colorScheme.primaryContainer, + backgroundColor: Theme.of(context).floatingActionButtonTheme.backgroundColor, child: Icon( Icons.shield_rounded, - color: Theme.of(context).colorScheme.onPrimaryContainer, + color: Theme.of(context).floatingActionButtonTheme.foregroundColor, ), ) : const SizedBox(); diff --git a/lib/screens/home/management_modal.dart b/lib/screens/home/management_modal.dart index 3c0b43d..6b77a22 100644 --- a/lib/screens/home/management_modal.dart +++ b/lib/screens/home/management_modal.dart @@ -94,7 +94,7 @@ class ManagementModal extends StatelessWidget { Icon( icon, size: 24, - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.iconColor, ), const SizedBox(width: 16), Text( @@ -144,7 +144,7 @@ class ManagementModal extends StatelessWidget { child: Icon( Icons.shield_rounded, size: 24, - color: Theme.of(context).colorScheme.secondary, + color: Theme.of(context).listTileTheme.iconColor ), ), Padding( diff --git a/lib/screens/logs/filter_status_modal.dart b/lib/screens/logs/filter_status_modal.dart index 470079b..371f3ab 100644 --- a/lib/screens/logs/filter_status_modal.dart +++ b/lib/screens/logs/filter_status_modal.dart @@ -57,7 +57,7 @@ class _FilterStatusModalState extends State { Icon( icon, size: 24, - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.iconColor ), const SizedBox(width: 16), Text( @@ -102,7 +102,7 @@ class _FilterStatusModalState extends State { child: Icon( Icons.shield_rounded, size: 24, - color: Theme.of(context).colorScheme.secondary, + color: Theme.of(context).listTileTheme.iconColor ), ), Text( diff --git a/lib/screens/logs/log_details_screen.dart b/lib/screens/logs/log_details_screen.dart index 037d118..f197795 100644 --- a/lib/screens/logs/log_details_screen.dart +++ b/lib/screens/logs/log_details_screen.dart @@ -141,14 +141,14 @@ class LogDetailsScreen extends StatelessWidget { vertical: 5 ), decoration: BoxDecoration( - color: Theme.of(context).colorScheme.primaryContainer, + color: Theme.of(context).floatingActionButtonTheme.backgroundColor, borderRadius: BorderRadius.circular(30) ), child: Text( "CACHE", style: TextStyle( fontSize: 12, - color: Theme.of(context).colorScheme.onPrimaryContainer, + color: Theme.of(context).floatingActionButtonTheme.foregroundColor, fontWeight: FontWeight.w500 ), ), @@ -278,14 +278,14 @@ class LogDetailsScreen extends StatelessWidget { vertical: 5 ), decoration: BoxDecoration( - color: Theme.of(context).colorScheme.primaryContainer, + color: Theme.of(context).floatingActionButtonTheme.backgroundColor, borderRadius: BorderRadius.circular(30) ), child: Text( a.type, style: TextStyle( fontSize: 12, - color: Theme.of(context).colorScheme.onPrimaryContainer, + color: Theme.of(context).floatingActionButtonTheme.foregroundColor, fontWeight: FontWeight.w500 ), ), diff --git a/lib/screens/logs/log_list_tile.dart b/lib/screens/logs/log_list_tile.dart index 6d052db..df57550 100644 --- a/lib/screens/logs/log_list_tile.dart +++ b/lib/screens/logs/log_list_tile.dart @@ -29,7 +29,7 @@ class LogListTile extends StatelessWidget { Icon( icon, size: 24, - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.iconColor, ), const SizedBox(width: 16), Flexible( @@ -48,7 +48,7 @@ class LogListTile extends StatelessWidget { subtitle!, style: TextStyle( fontSize: 14, - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.textColor, ), ) ], diff --git a/lib/screens/logs/log_tile.dart b/lib/screens/logs/log_tile.dart index 49d6c33..8f3ea9d 100644 --- a/lib/screens/logs/log_tile.dart +++ b/lib/screens/logs/log_tile.dart @@ -97,7 +97,7 @@ class LogTile extends StatelessWidget { Icon( Icons.smartphone_rounded, size: 16, - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.textColor, ), const SizedBox(width: 5), SizedBox( @@ -105,7 +105,7 @@ class LogTile extends StatelessWidget { log.client, overflow: TextOverflow.ellipsis, style: TextStyle( - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.textColor, fontSize: 14, height: 1.4, fontWeight: FontWeight.w400, @@ -118,7 +118,7 @@ class LogTile extends StatelessWidget { Icon( Icons.schedule_rounded, size: 16, - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.textColor, ), const SizedBox(width: 5), SizedBox( @@ -126,7 +126,7 @@ class LogTile extends StatelessWidget { formatTimestampUTCFromAPI(log.time, 'HH:mm:ss'), overflow: TextOverflow.ellipsis, style: TextStyle( - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.textColor, fontSize: 13 ), ), @@ -141,7 +141,7 @@ class LogTile extends StatelessWidget { Icon( Icons.smartphone_rounded, size: 16, - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.textColor, ), const SizedBox(width: 15), SizedBox( @@ -149,7 +149,7 @@ class LogTile extends StatelessWidget { log.client, overflow: TextOverflow.ellipsis, style: TextStyle( - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.textColor, fontSize: 13 ), ), @@ -171,7 +171,7 @@ class LogTile extends StatelessWidget { log.clientInfo!.name, overflow: TextOverflow.ellipsis, style: TextStyle( - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.textColor, fontSize: 13 ), ), @@ -185,7 +185,7 @@ class LogTile extends StatelessWidget { Icon( Icons.schedule_rounded, size: 16, - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.textColor, ), const SizedBox(width: 15), SizedBox( @@ -193,7 +193,7 @@ class LogTile extends StatelessWidget { formatTimestampUTCFromAPI(log.time, 'HH:mm:ss'), overflow: TextOverflow.ellipsis, style: TextStyle( - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.textColor, fontSize: 13 ), ), @@ -207,7 +207,7 @@ class LogTile extends StatelessWidget { Icon( Icons.timer, size: 16, - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.textColor, ), const SizedBox(width: 15), SizedBox( @@ -215,7 +215,7 @@ class LogTile extends StatelessWidget { "${double.parse(log.elapsedMs).toStringAsFixed(2)} ms", overflow: TextOverflow.ellipsis, style: TextStyle( - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.textColor, fontSize: 13 ), ), diff --git a/lib/screens/logs/logs_config_modal.dart b/lib/screens/logs/logs_config_modal.dart index 2b3936b..ebd594e 100644 --- a/lib/screens/logs/logs_config_modal.dart +++ b/lib/screens/logs/logs_config_modal.dart @@ -131,7 +131,7 @@ class _LogsConfigModalWidgetState extends State { child: Icon( Icons.settings, size: 24, - color: Theme.of(context).colorScheme.secondary, + color: Theme.of(context).listTileTheme.iconColor ), ), const SizedBox(height: 16), diff --git a/lib/screens/logs/logs_filters_modal.dart b/lib/screens/logs/logs_filters_modal.dart index c7dd152..7cd72e6 100644 --- a/lib/screens/logs/logs_filters_modal.dart +++ b/lib/screens/logs/logs_filters_modal.dart @@ -195,7 +195,7 @@ class _LogsFiltersModalWidgetState extends State { child: Icon( Icons.filter_list_rounded, size: 24, - color: Theme.of(context).colorScheme.secondary, + color: Theme.of(context).listTileTheme.iconColor ), ), Text( diff --git a/lib/screens/servers/servers.dart b/lib/screens/servers/servers.dart index 9540540..89fd1ec 100644 --- a/lib/screens/servers/servers.dart +++ b/lib/screens/servers/servers.dart @@ -88,10 +88,10 @@ class _ServersState extends State { right: 20, child: FloatingActionButton( onPressed: openAddServerModal, - backgroundColor: Theme.of(context).colorScheme.primaryContainer, + backgroundColor: Theme.of(context).floatingActionButtonTheme.backgroundColor, child: Icon( Icons.add, - color: Theme.of(context).colorScheme.onPrimaryContainer + color: Theme.of(context).floatingActionButtonTheme.foregroundColor, ), ), ), diff --git a/lib/screens/settings/access_settings/access_settings.dart b/lib/screens/settings/access_settings/access_settings.dart index 0a9cb92..f6db465 100644 --- a/lib/screens/settings/access_settings/access_settings.dart +++ b/lib/screens/settings/access_settings/access_settings.dart @@ -117,9 +117,7 @@ class _AccessSettingsWidgetState extends State with Ticker color: Theme.of(context).scaffoldBackgroundColor, border: Border( top: BorderSide( - color: Theme.of(context).brightness == Brightness.light - ? const Color.fromRGBO(220, 220, 220, 1) - : const Color.fromRGBO(50, 50, 50, 1) + color: Theme.of(context).colorScheme.onSurface.withOpacity(0.1) ) ) ), diff --git a/lib/screens/settings/access_settings/add_client_modal.dart b/lib/screens/settings/access_settings/add_client_modal.dart index 5291188..6e0105c 100644 --- a/lib/screens/settings/access_settings/add_client_modal.dart +++ b/lib/screens/settings/access_settings/add_client_modal.dart @@ -86,7 +86,7 @@ class _AddClientModalState extends State { Icon( icon(), size: 24, - color: Theme.of(context).colorScheme.secondary, + color: Theme.of(context).listTileTheme.iconColor ), const SizedBox(height: 16), Text( diff --git a/lib/screens/settings/access_settings/clients_list.dart b/lib/screens/settings/access_settings/clients_list.dart index 51223d1..1f8fa85 100644 --- a/lib/screens/settings/access_settings/clients_list.dart +++ b/lib/screens/settings/access_settings/clients_list.dart @@ -246,7 +246,7 @@ class _ClientsListState extends State { children: [ Icon( Icons.info_rounded, - color: Theme.of(context).colorScheme.secondary, + color: Theme.of(context).listTileTheme.iconColor, ), const SizedBox(width: 20), Flexible( @@ -267,7 +267,13 @@ class _ClientsListState extends State { padding: const EdgeInsets.only(top: 0), itemCount: widget.data.length, itemBuilder: (context, index) => ListTile( - title: Text(widget.data[index]), + title: Text( + widget.data[index], + style: TextStyle( + fontWeight: FontWeight.normal, + color: Theme.of(context).colorScheme.onSurface + ), + ), trailing: IconButton( onPressed: () => { showDialog( @@ -315,7 +321,7 @@ class _ClientsListState extends State { : -70, right: 20, child: FloatingActionButton( - backgroundColor: Theme.of(context).colorScheme.primaryContainer, + backgroundColor: Theme.of(context).floatingActionButtonTheme.backgroundColor, onPressed: () { showModalBottomSheet( context: context, @@ -329,7 +335,7 @@ class _ClientsListState extends State { }, child: Icon( Icons.add, - color: Theme.of(context).colorScheme.onPrimaryContainer + color: Theme.of(context).floatingActionButtonTheme.foregroundColor, ), ), ) diff --git a/lib/screens/settings/dhcp/add_static_lease_modal.dart b/lib/screens/settings/dhcp/add_static_lease_modal.dart index 54fc3ec..3091b40 100644 --- a/lib/screens/settings/dhcp/add_static_lease_modal.dart +++ b/lib/screens/settings/dhcp/add_static_lease_modal.dart @@ -68,7 +68,7 @@ class _AddStaticLeaseModalState extends State { return Padding( padding: MediaQuery.of(context).viewInsets, child: Container( - height: 550, + height: 510, decoration: BoxDecoration( color: Theme.of(context).dialogBackgroundColor, borderRadius: const BorderRadius.only( @@ -84,22 +84,24 @@ class _AddStaticLeaseModalState extends State { ? const NeverScrollableScrollPhysics() : null, children: [ - const Padding( - padding: EdgeInsets.only(top: 28), + Padding( + padding: const EdgeInsets.only(top: 24), child: Icon( Icons.add, - size: 26, + size: 24, + color: Theme.of(context).listTileTheme.iconColor ), ), - const SizedBox(height: 20), + const SizedBox(height: 16), Text( AppLocalizations.of(context)!.addStaticLease, textAlign: TextAlign.center, - style: const TextStyle( - fontSize: 24 + style: TextStyle( + fontSize: 24, + color: Theme.of(context).colorScheme.onSurface ), ), - const SizedBox(height: 30), + const SizedBox(height: 16), Padding( padding: const EdgeInsets.symmetric(horizontal: 28), child: TextFormField( diff --git a/lib/screens/settings/dhcp/delete_static_lease_modal.dart b/lib/screens/settings/dhcp/delete_static_lease_modal.dart index 630079b..77ad241 100644 --- a/lib/screens/settings/dhcp/delete_static_lease_modal.dart +++ b/lib/screens/settings/dhcp/delete_static_lease_modal.dart @@ -14,18 +14,27 @@ class DeleteStaticLeaseModal extends StatelessWidget { return AlertDialog( title: Column( children: [ - const Icon( + Icon( Icons.delete_rounded, - size: 26, + size: 24, + color: Theme.of(context).listTileTheme.iconColor ), - const SizedBox(height: 20), + const SizedBox(height: 16), Text( AppLocalizations.of(context)!.deleteStaticLease, textAlign: TextAlign.center, + style: TextStyle( + color: Theme.of(context).colorScheme.onSurface + ), ) ], ), - content: Text(AppLocalizations.of(context)!.deleteStaticLeaseDescription), + content: Text( + AppLocalizations.of(context)!.deleteStaticLeaseDescription, + style: TextStyle( + color: Theme.of(context).colorScheme.onSurfaceVariant + ), + ), actions: [ TextButton( onPressed: () => Navigator.pop(context), diff --git a/lib/screens/settings/dhcp/dhcp.dart b/lib/screens/settings/dhcp/dhcp.dart index c0cb2c4..85e3796 100644 --- a/lib/screens/settings/dhcp/dhcp.dart +++ b/lib/screens/settings/dhcp/dhcp.dart @@ -409,7 +409,7 @@ class _DhcpWidgetState extends State { selectedInterface!.name, style: TextStyle( fontSize: 14, - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.textColor ), ) ] diff --git a/lib/screens/settings/dhcp/dhcp_leases.dart b/lib/screens/settings/dhcp/dhcp_leases.dart index f1033d6..4f10b77 100644 --- a/lib/screens/settings/dhcp/dhcp_leases.dart +++ b/lib/screens/settings/dhcp/dhcp_leases.dart @@ -184,9 +184,10 @@ class DhcpLeases extends StatelessWidget { floatingActionButton: staticLeases == true ? FloatingActionButton( onPressed: openAddStaticLease, + backgroundColor: Theme.of(context).floatingActionButtonTheme.backgroundColor, child: Icon( Icons.add, - color: Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white, + color: Theme.of(context).floatingActionButtonTheme.foregroundColor, ), ) : null, diff --git a/lib/screens/settings/dhcp/select_interface_modal.dart b/lib/screens/settings/dhcp/select_interface_modal.dart index a1cf441..49b5957 100644 --- a/lib/screens/settings/dhcp/select_interface_modal.dart +++ b/lib/screens/settings/dhcp/select_interface_modal.dart @@ -36,7 +36,7 @@ class SelectInterfaceModal extends StatelessWidget { child: Icon( Icons.settings_ethernet_rounded, size: 24, - color: Theme.of(context).colorScheme.secondary, + color: Theme.of(context).listTileTheme.iconColor ), ), const SizedBox(height: 16), diff --git a/lib/screens/settings/dns/bootstrap_dns.dart b/lib/screens/settings/dns/bootstrap_dns.dart index bbf1939..394ea7f 100644 --- a/lib/screens/settings/dns/bootstrap_dns.dart +++ b/lib/screens/settings/dns/bootstrap_dns.dart @@ -142,7 +142,7 @@ class _BootstrapDnsScreenState extends State { children: [ Icon( Icons.info_rounded, - color: Theme.of(context).colorScheme.secondary + color: Theme.of(context).listTileTheme.iconColor, ), const SizedBox(width: 20), Flexible( diff --git a/lib/screens/settings/dns/private_reverse_servers.dart b/lib/screens/settings/dns/private_reverse_servers.dart index 89c47dc..381e495 100644 --- a/lib/screens/settings/dns/private_reverse_servers.dart +++ b/lib/screens/settings/dns/private_reverse_servers.dart @@ -175,7 +175,7 @@ class _PrivateReverseDnsServersScreenState extends State { child: Icon( Icons.add, size: 24, - color: Theme.of(context).colorScheme.secondary, + color: Theme.of(context).listTileTheme.iconColor ), ), const SizedBox(height: 16), diff --git a/lib/screens/settings/dns_rewrites/dns_rewrites.dart b/lib/screens/settings/dns_rewrites/dns_rewrites.dart index 914c0c0..3d2e77a 100644 --- a/lib/screens/settings/dns_rewrites/dns_rewrites.dart +++ b/lib/screens/settings/dns_rewrites/dns_rewrites.dart @@ -286,6 +286,7 @@ class _DnsRewritesWidgetState extends State { ), body: generateBody(), floatingActionButton: FloatingActionButton( + backgroundColor: Theme.of(context).floatingActionButtonTheme.backgroundColor, onPressed: () => { showModalBottomSheet( context: context, @@ -298,7 +299,7 @@ class _DnsRewritesWidgetState extends State { }, child: Icon( Icons.add, - color: Theme.of(context).primaryColor.computeLuminance() > 0.5 ? Colors.black : Colors.white, + color: Theme.of(context).floatingActionButtonTheme.foregroundColor, ), ), ); diff --git a/lib/screens/settings/encryption/encryption.dart b/lib/screens/settings/encryption/encryption.dart index 8ce1ff8..d57c5a8 100644 --- a/lib/screens/settings/encryption/encryption.dart +++ b/lib/screens/settings/encryption/encryption.dart @@ -376,7 +376,7 @@ class _EncryptionSettingsWidgetState extends State { children: [ Icon( Icons.info_rounded, - color: Theme.of(context).colorScheme.secondary, + color: Theme.of(context).listTileTheme.iconColor, ), const SizedBox(width: 20), Flexible( diff --git a/lib/screens/settings/encryption/master_switch.dart b/lib/screens/settings/encryption/master_switch.dart index 694138a..61c1f14 100644 --- a/lib/screens/settings/encryption/master_switch.dart +++ b/lib/screens/settings/encryption/master_switch.dart @@ -49,7 +49,7 @@ class EncryptionMasterSwitch extends StatelessWidget { AppLocalizations.of(context)!.enableEncryptionTypes, style: TextStyle( fontSize: 14, - color: Theme.of(context).colorScheme.onSurfaceVariant + color: Theme.of(context).listTileTheme.textColor ), ) ], diff --git a/lib/screens/settings/server_info/dns_addresses_modal.dart b/lib/screens/settings/server_info/dns_addresses_modal.dart index 25f90aa..2a6fa2f 100644 --- a/lib/screens/settings/server_info/dns_addresses_modal.dart +++ b/lib/screens/settings/server_info/dns_addresses_modal.dart @@ -16,7 +16,7 @@ class DnsAddressesModal extends StatelessWidget { children: [ Icon( Icons.route_rounded, - color: Theme.of(context).colorScheme.secondary, + color: Theme.of(context).listTileTheme.iconColor ), const SizedBox(height: 16), Text( @@ -37,7 +37,7 @@ class DnsAddressesModal extends StatelessWidget { address, style: TextStyle( fontWeight: FontWeight.normal, - color: Theme.of(context).colorScheme.onSurfaceVariant + color: Theme.of(context).listTileTheme.textColor ), ), )).toList(), diff --git a/lib/screens/top_items/top_items.dart b/lib/screens/top_items/top_items.dart index c6a8ce8..734b640 100644 --- a/lib/screens/top_items/top_items.dart +++ b/lib/screens/top_items/top_items.dart @@ -180,7 +180,7 @@ class _TopItemsScreenState extends State { child: Text( "${doubleFormat((screenData[index].values.toList()[0]/total*100), Platform.localeName)}%", style: TextStyle( - color: Theme.of(context).colorScheme.onSurfaceVariant + color: Theme.of(context).listTileTheme.textColor ), ), ), diff --git a/lib/widgets/add_server_modal.dart b/lib/widgets/add_server_modal.dart index c23dfe9..3c19202 100644 --- a/lib/widgets/add_server_modal.dart +++ b/lib/widgets/add_server_modal.dart @@ -252,7 +252,11 @@ class _AddServerModalState extends State { 0: Text( 'HTTP', style: TextStyle( - color: Theme.of(context).colorScheme.onSurface, + color: appConfigProvider.useDynamicColor == true + ? Theme.of(context).floatingActionButtonTheme.foregroundColor! + : connectionType == 'http' + ? Colors.white + : Theme.of(context).primaryColor, fontSize: 14, fontWeight: FontWeight.w500 ), @@ -260,7 +264,11 @@ class _AddServerModalState extends State { 1: Text( 'HTTPS', style: TextStyle( - color: Theme.of(context).colorScheme.onSurface, + color: appConfigProvider.useDynamicColor == true + ? Theme.of(context).floatingActionButtonTheme.foregroundColor! + : connectionType == 'https' + ? Colors.white + : Theme.of(context).primaryColor, fontSize: 14, fontWeight: FontWeight.w500 ), @@ -475,13 +483,11 @@ class _AddServerModalState extends State { ); } } -print(connectionType); + return Stack( children: [ Scaffold( - backgroundColor: Theme.of(context).dialogBackgroundColor, - appBar: AppBar( - systemOverlayStyle: systemUiOverlayStyleConfig(context), + appBar: AppBar( title: Text(AppLocalizations.of(context)!.createConnection), actions: [ Padding( @@ -560,7 +566,7 @@ print(connectionType); connectionType = 'https'; } }), - selectedColor: Theme.of(context).colorScheme.secondaryContainer, + selectedColor: Theme.of(context).floatingActionButtonTheme.backgroundColor!, unselectedColor: Colors.transparent, borderColor: Theme.of(context).colorScheme.onSurface, ), diff --git a/lib/widgets/custom_list_tile.dart b/lib/widgets/custom_list_tile.dart index ab42117..194c6a7 100644 --- a/lib/widgets/custom_list_tile.dart +++ b/lib/widgets/custom_list_tile.dart @@ -39,7 +39,7 @@ class CustomListTile extends StatelessWidget { Icon( icon, size: 24, - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.iconColor, ), const SizedBox(width: 16), ], @@ -61,7 +61,7 @@ class CustomListTile extends StatelessWidget { if (subtitle != null && subtitleWidget == null) Text( subtitle!, style: TextStyle( - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.textColor, fontSize: 14, fontWeight: FontWeight.w400 ), diff --git a/lib/widgets/custom_radio_list_tile.dart b/lib/widgets/custom_radio_list_tile.dart index 6592321..802431e 100644 --- a/lib/widgets/custom_radio_list_tile.dart +++ b/lib/widgets/custom_radio_list_tile.dart @@ -59,7 +59,7 @@ class CustomRadioListTile extends StatelessWidget { child: Text( subtitle!, style: TextStyle( - color: Theme.of(context).colorScheme.onSurfaceVariant, + color: Theme.of(context).listTileTheme.textColor, fontSize: 14 ), ), diff --git a/lib/widgets/custom_switch_list_tile.dart b/lib/widgets/custom_switch_list_tile.dart index ee70ffa..cc46a8f 100644 --- a/lib/widgets/custom_switch_list_tile.dart +++ b/lib/widgets/custom_switch_list_tile.dart @@ -55,8 +55,8 @@ class CustomSwitchListTile extends StatelessWidget { style: TextStyle( fontSize: 14, color: disabled != null && disabled == true - ? Theme.of(context).colorScheme.onSurfaceVariant.withOpacity(0.38) - : Theme.of(context).colorScheme.onSurfaceVariant + ? Theme.of(context).listTileTheme.textColor!.withOpacity(0.38) + : Theme.of(context).listTileTheme.textColor ), ), ), diff --git a/lib/widgets/servers_list/delete_modal.dart b/lib/widgets/servers_list/delete_modal.dart index 955b4b4..2cc9809 100644 --- a/lib/widgets/servers_list/delete_modal.dart +++ b/lib/widgets/servers_list/delete_modal.dart @@ -49,7 +49,7 @@ class DeleteModal extends StatelessWidget { Icon( Icons.delete, size: 24, - color: Theme.of(context).colorScheme.secondary + color: Theme.of(context).listTileTheme.iconColor ), Padding( padding: const EdgeInsets.only(top: 16), diff --git a/lib/widgets/servers_list/servers_list.dart b/lib/widgets/servers_list/servers_list.dart index b7a46fe..1ba3d1e 100644 --- a/lib/widgets/servers_list/servers_list.dart +++ b/lib/widgets/servers_list/servers_list.dart @@ -187,12 +187,12 @@ class _ServersListState extends State with SingleTickerProviderStat Container( padding: const EdgeInsets.all(1), decoration: BoxDecoration( - color: Theme.of(context).colorScheme.primaryContainer, + color: Theme.of(context).floatingActionButtonTheme.backgroundColor, borderRadius: BorderRadius.circular(20) ), child: Icon( Icons.star, - color: Theme.of(context).colorScheme.onPrimaryContainer, + color: Theme.of(context).floatingActionButtonTheme.foregroundColor, size: 10, ), ), diff --git a/lib/widgets/update_modal.dart b/lib/widgets/update_modal.dart index 5940cf8..b3acc8d 100644 --- a/lib/widgets/update_modal.dart +++ b/lib/widgets/update_modal.dart @@ -37,7 +37,7 @@ class _UpdateModalState extends State { Icon( Icons.system_update_rounded, size: 24, - color: Theme.of(context).colorScheme.secondary, + color: Theme.of(context).listTileTheme.iconColor, ), const SizedBox(height: 16), Text(