From 9b4a8ebc69ffc1389f1f748c49f6ab806f4b5ebf Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Wed, 7 Sep 2022 12:20:13 +0100 Subject: [PATCH] fix: Further improvements on app theming --- .../patchesSelectorView/patch_item.dart | 2 +- .../settingsView/social_media_widget.dart | 96 +++++++++++++++---- lib/ui/widgets/shared/custom_popup_menu.dart | 4 + .../widgets/shared/custom_sliver_app_bar.dart | 5 +- lib/ui/widgets/shared/search_bar.dart | 3 + 5 files changed, 87 insertions(+), 23 deletions(-) diff --git a/lib/ui/widgets/patchesSelectorView/patch_item.dart b/lib/ui/widgets/patchesSelectorView/patch_item.dart index bf18a8ad..e658a1cb 100644 --- a/lib/ui/widgets/patchesSelectorView/patch_item.dart +++ b/lib/ui/widgets/patchesSelectorView/patch_item.dart @@ -88,7 +88,7 @@ class _PatchItemState extends State { checkColor: Theme.of(context).colorScheme.secondaryContainer, side: BorderSide( - width: 1.5, + width: 2.0, color: Theme.of(context).colorScheme.primary, ), onChanged: (newValue) { diff --git a/lib/ui/widgets/settingsView/social_media_widget.dart b/lib/ui/widgets/settingsView/social_media_widget.dart index 2e6202a2..003f170c 100644 --- a/lib/ui/widgets/settingsView/social_media_widget.dart +++ b/lib/ui/widgets/settingsView/social_media_widget.dart @@ -40,11 +40,21 @@ class SocialMediaWidget extends StatelessWidget { padding: const EdgeInsets.all(8.0), child: FaIcon( FontAwesomeIcons.github, - color: Theme.of(context).iconTheme.color, + color: Theme.of(context).colorScheme.secondary, + ), + ), + title: Text( + 'GitHub', + style: TextStyle( + color: Theme.of(context).colorScheme.secondary, + ), + ), + subtitle: Text( + 'github.com/revanced', + style: TextStyle( + color: Theme.of(context).colorScheme.secondary, ), ), - title: const Text('GitHub'), - subtitle: const Text('github.com/revanced'), onTap: () => launchUrl( Uri.parse('https://github.com/revanced'), mode: LaunchMode.externalApplication, @@ -56,11 +66,21 @@ class SocialMediaWidget extends StatelessWidget { padding: const EdgeInsets.all(8.0).copyWith(left: 5), child: FaIcon( FontAwesomeIcons.discord, - color: Theme.of(context).iconTheme.color, + color: Theme.of(context).colorScheme.secondary, + ), + ), + title: Text( + 'Discord', + style: TextStyle( + color: Theme.of(context).colorScheme.secondary, + ), + ), + subtitle: Text( + 'discord.gg/revanced', + style: TextStyle( + color: Theme.of(context).colorScheme.secondary, ), ), - title: const Text('Discord'), - subtitle: const Text('discord.gg/revanced'), onTap: () => launchUrl( Uri.parse('https://discord.gg/rF2YcEjcrT'), mode: LaunchMode.externalApplication, @@ -72,11 +92,21 @@ class SocialMediaWidget extends StatelessWidget { padding: const EdgeInsets.all(8.0), child: FaIcon( FontAwesomeIcons.telegram, - color: Theme.of(context).iconTheme.color, + color: Theme.of(context).colorScheme.secondary, + ), + ), + title: Text( + 'Telegram', + style: TextStyle( + color: Theme.of(context).colorScheme.secondary, + ), + ), + subtitle: Text( + 't.me/app_revanced', + style: TextStyle( + color: Theme.of(context).colorScheme.secondary, ), ), - title: const Text('Telegram'), - subtitle: const Text('t.me/app_revanced'), onTap: () => launchUrl( Uri.parse('https://t.me/app_revanced'), mode: LaunchMode.externalApplication, @@ -88,11 +118,21 @@ class SocialMediaWidget extends StatelessWidget { padding: const EdgeInsets.all(8.0), child: FaIcon( FontAwesomeIcons.reddit, - color: Theme.of(context).iconTheme.color, + color: Theme.of(context).colorScheme.secondary, + ), + ), + title: Text( + 'Reddit', + style: TextStyle( + color: Theme.of(context).colorScheme.secondary, + ), + ), + subtitle: Text( + 'r/revancedapp', + style: TextStyle( + color: Theme.of(context).colorScheme.secondary, ), ), - title: const Text('Reddit'), - subtitle: const Text('r/revancedapp'), onTap: () => launchUrl( Uri.parse('https://reddit.com/r/revancedapp'), mode: LaunchMode.externalApplication, @@ -104,11 +144,21 @@ class SocialMediaWidget extends StatelessWidget { padding: const EdgeInsets.all(8.0), child: FaIcon( FontAwesomeIcons.twitter, - color: Theme.of(context).iconTheme.color, + color: Theme.of(context).colorScheme.secondary, + ), + ), + title: Text( + 'Twitter', + style: TextStyle( + color: Theme.of(context).colorScheme.secondary, + ), + ), + subtitle: Text( + '@revancedapp', + style: TextStyle( + color: Theme.of(context).colorScheme.secondary, ), ), - title: const Text('Twitter'), - subtitle: const Text('@revancedapp'), onTap: () => launchUrl( Uri.parse('https://twitter.com/revancedapp'), mode: LaunchMode.externalApplication, @@ -120,11 +170,21 @@ class SocialMediaWidget extends StatelessWidget { padding: const EdgeInsets.all(8.0), child: FaIcon( FontAwesomeIcons.youtube, - color: Theme.of(context).iconTheme.color, + color: Theme.of(context).colorScheme.secondary, + ), + ), + title: Text( + 'YouTube', + style: TextStyle( + color: Theme.of(context).colorScheme.secondary, + ), + ), + subtitle: Text( + 'youtube.com/revanced', + style: TextStyle( + color: Theme.of(context).colorScheme.secondary, ), ), - title: const Text('YouTube'), - subtitle: const Text('youtube.com/revanced'), onTap: () => launchUrl( Uri.parse('https://youtube.com/revanced'), mode: LaunchMode.externalApplication, diff --git a/lib/ui/widgets/shared/custom_popup_menu.dart b/lib/ui/widgets/shared/custom_popup_menu.dart index 67dbd784..9383d9f1 100644 --- a/lib/ui/widgets/shared/custom_popup_menu.dart +++ b/lib/ui/widgets/shared/custom_popup_menu.dart @@ -15,6 +15,10 @@ class CustomPopupMenu extends StatelessWidget { return Theme( data: Theme.of(context).copyWith(useMaterial3: false), child: PopupMenuButton( + icon: Icon( + Icons.more_vert, + color: Theme.of(context).colorScheme.secondary, + ), onSelected: onSelected, itemBuilder: (context) => children.entries .map( diff --git a/lib/ui/widgets/shared/custom_sliver_app_bar.dart b/lib/ui/widgets/shared/custom_sliver_app_bar.dart index be683e79..ea416f1c 100644 --- a/lib/ui/widgets/shared/custom_sliver_app_bar.dart +++ b/lib/ui/widgets/shared/custom_sliver_app_bar.dart @@ -26,10 +26,7 @@ class CustomSliverAppBar extends StatelessWidget { : Theme.of(context).canvasColor, ), flexibleSpace: FlexibleSpaceBar( - titlePadding: const EdgeInsets.symmetric( - vertical: 23.0, - horizontal: 20.0, - ), + titlePadding: const EdgeInsets.only(bottom: 16.0, left: 20.0), title: title, ), actions: actions, diff --git a/lib/ui/widgets/shared/search_bar.dart b/lib/ui/widgets/shared/search_bar.dart index 2e8b8a00..af53ce65 100644 --- a/lib/ui/widgets/shared/search_bar.dart +++ b/lib/ui/widgets/shared/search_bar.dart @@ -36,6 +36,9 @@ class _SearchBarState extends State { child: TextFormField( onChanged: widget.onQueryChanged, controller: _textController, + style: TextStyle( + color: Theme.of(context).colorScheme.secondary, + ), decoration: InputDecoration( filled: true, fillColor: Theme.of(context).colorScheme.secondaryContainer,