From 57a4c65d2c8453850f07052069cdb4a97bbaed22 Mon Sep 17 00:00:00 2001 From: Kima Date: Sun, 28 Apr 2024 18:02:45 +0200 Subject: [PATCH] made dark mode colors better kinda --- refilc/lib/theme/theme.dart | 8 +++++--- refilc_mobile_ui/lib/common/filter_bar.dart | 2 +- .../lib/common/profile_image/profile_button.dart | 2 +- refilc_mobile_ui/lib/pages/absences/absences_page.dart | 2 +- refilc_mobile_ui/lib/pages/grades/grade_subject_view.dart | 8 ++++---- refilc_mobile_ui/lib/pages/grades/grades_page.dart | 2 +- refilc_mobile_ui/lib/pages/home/home_page.dart | 2 +- refilc_mobile_ui/lib/pages/messages/messages_page.dart | 2 +- refilc_mobile_ui/lib/pages/notes/notes_page.dart | 2 +- refilc_mobile_ui/lib/pages/timetable/timetable_page.dart | 2 +- refilc_mobile_ui/lib/screens/navigation/navbar_item.dart | 2 +- .../lib/screens/settings/accounts/account_view.dart | 2 +- .../lib/screens/settings/settings_screen.dart | 2 +- 13 files changed, 20 insertions(+), 18 deletions(-) diff --git a/refilc/lib/theme/theme.dart b/refilc/lib/theme/theme.dart index 33a3953..755589e 100644 --- a/refilc/lib/theme/theme.dart +++ b/refilc/lib/theme/theme.dart @@ -83,7 +83,8 @@ class AppTheme { accentColor == AccentColor.ogfilc) || !settings.newColors ? accent - : ColorsUtils().darken(accent, amount: 0.5); + : ColorsUtils().darken(accent, + amount: 0.4); // white mode: same tertiary as secondary return ThemeData( brightness: Brightness.light, @@ -186,14 +187,15 @@ class AppTheme { accentColor == AccentColor.ogfilc) || !settings.newColors ? accent - : ColorsUtils().lighten(accent, amount: 0.1); + : ColorsUtils().lighten(accent, amount: 0.3); // Color newScaffoldBg = ColorsUtils().lighten(accent, amount: 0.4); Color newTertiary = (accentColor == AccentColor.adaptive || accentColor == AccentColor.custom || accentColor == AccentColor.ogfilc) || !settings.newColors ? accent - : ColorsUtils().lighten(accent, amount: 0.4); + : ColorsUtils().darken(accent, + amount: 0.1); // dark mode: tertiary is way darker than secondary return ThemeData( brightness: Brightness.dark, diff --git a/refilc_mobile_ui/lib/common/filter_bar.dart b/refilc_mobile_ui/lib/common/filter_bar.dart index ade96a3..019b4c5 100644 --- a/refilc_mobile_ui/lib/common/filter_bar.dart +++ b/refilc_mobile_ui/lib/common/filter_bar.dart @@ -61,7 +61,7 @@ class _FilterBarState extends State { indicatorSize: TabBarIndicatorSize.tab, indicatorPadding: const EdgeInsets.symmetric(vertical: 8.0), indicator: BoxDecoration( - color: Theme.of(context).colorScheme.secondary.withOpacity(.2), + color: Theme.of(context).colorScheme.tertiary.withOpacity(.2), borderRadius: BorderRadius.circular(45.0), ), overlayColor: MaterialStateProperty.all(const Color(0x00000000)), diff --git a/refilc_mobile_ui/lib/common/profile_image/profile_button.dart b/refilc_mobile_ui/lib/common/profile_image/profile_button.dart index a4b1f5d..e63eba2 100644 --- a/refilc_mobile_ui/lib/common/profile_image/profile_button.dart +++ b/refilc_mobile_ui/lib/common/profile_image/profile_button.dart @@ -58,7 +58,7 @@ class ProfileButton extends StatelessWidget { return ProfileImage( backgroundColor: !pMode ? child.backgroundColor - : Theme.of(context).colorScheme.secondary, + : Theme.of(context).colorScheme.tertiary, heroTag: child.heroTag, key: child.key, name: !pMode ? child.name : "János", diff --git a/refilc_mobile_ui/lib/pages/absences/absences_page.dart b/refilc_mobile_ui/lib/pages/absences/absences_page.dart index 6f69382..6b02ce1 100644 --- a/refilc_mobile_ui/lib/pages/absences/absences_page.dart +++ b/refilc_mobile_ui/lib/pages/absences/absences_page.dart @@ -165,7 +165,7 @@ class AbsencesPageState extends State name: firstName, backgroundColor: Theme.of(context) .colorScheme - .secondary, //ColorUtils.stringToColor(user.displayName ?? "?"), + .tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"), badge: updateProvider.available, role: user.role, profilePictureString: user.picture, diff --git a/refilc_mobile_ui/lib/pages/grades/grade_subject_view.dart b/refilc_mobile_ui/lib/pages/grades/grade_subject_view.dart index e0e100a..0bb1df2 100644 --- a/refilc_mobile_ui/lib/pages/grades/grade_subject_view.dart +++ b/refilc_mobile_ui/lib/pages/grades/grade_subject_view.dart @@ -385,7 +385,7 @@ class _GradeSubjectViewState extends State builder: (context, onPressed, progress) => FloatingActionButton.small( onPressed: onPressed, - backgroundColor: Theme.of(context).colorScheme.secondary, + backgroundColor: Theme.of(context).colorScheme.tertiary, child: const Icon(Icons.more_horiz_outlined), ), ), @@ -394,7 +394,7 @@ class _GradeSubjectViewState extends State builder: (context, onPressed, progress) => FloatingActionButton.small( onPressed: onPressed, - backgroundColor: Theme.of(context).colorScheme.secondary, + backgroundColor: Theme.of(context).colorScheme.tertiary, child: const Icon(Icons.close), ), ), @@ -404,7 +404,7 @@ class _GradeSubjectViewState extends State children: [ FloatingActionButton.small( heroTag: "btn_ghost_grades", - backgroundColor: Theme.of(context).colorScheme.secondary, + backgroundColor: Theme.of(context).colorScheme.tertiary, onPressed: () { gradeCalc(context); }, @@ -412,7 +412,7 @@ class _GradeSubjectViewState extends State ), FloatingActionButton.small( heroTag: "btn_goal_planner", - backgroundColor: Theme.of(context).colorScheme.secondary, + backgroundColor: Theme.of(context).colorScheme.tertiary, onPressed: () { // if (!Provider.of(context, listen: false) // .hasScope(PremiumScopes.goalPlanner)) { diff --git a/refilc_mobile_ui/lib/pages/grades/grades_page.dart b/refilc_mobile_ui/lib/pages/grades/grades_page.dart index 7305bc8..88f1030 100644 --- a/refilc_mobile_ui/lib/pages/grades/grades_page.dart +++ b/refilc_mobile_ui/lib/pages/grades/grades_page.dart @@ -546,7 +546,7 @@ class GradesPageState extends State { name: firstName, backgroundColor: Theme.of(context) .colorScheme - .secondary, //ColorUtils.stringToColor(user.displayName ?? "?"), + .tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"), badge: updateProvider.available, role: user.role, profilePictureString: user.picture, diff --git a/refilc_mobile_ui/lib/pages/home/home_page.dart b/refilc_mobile_ui/lib/pages/home/home_page.dart index 06106d0..3981d45 100644 --- a/refilc_mobile_ui/lib/pages/home/home_page.dart +++ b/refilc_mobile_ui/lib/pages/home/home_page.dart @@ -307,7 +307,7 @@ class HomePageState extends State with TickerProviderStateMixin { name: firstName, backgroundColor: Theme.of(context) .colorScheme - .secondary, //!settings.presentationMode + .tertiary, //!settings.presentationMode //? ColorUtils.stringToColor(user.displayName ?? "?") //: Theme.of(context).colorScheme.secondary, badge: updateProvider.available, diff --git a/refilc_mobile_ui/lib/pages/messages/messages_page.dart b/refilc_mobile_ui/lib/pages/messages/messages_page.dart index c000ca9..b36ea1c 100644 --- a/refilc_mobile_ui/lib/pages/messages/messages_page.dart +++ b/refilc_mobile_ui/lib/pages/messages/messages_page.dart @@ -105,7 +105,7 @@ class MessagesPageState extends State name: firstName, backgroundColor: Theme.of(context) .colorScheme - .secondary, //ColorUtils.stringToColor(user.displayName ?? "?"), + .tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"), badge: updateProvider.available, role: user.role, profilePictureString: user.picture, diff --git a/refilc_mobile_ui/lib/pages/notes/notes_page.dart b/refilc_mobile_ui/lib/pages/notes/notes_page.dart index ef814c3..c5ee6c5 100644 --- a/refilc_mobile_ui/lib/pages/notes/notes_page.dart +++ b/refilc_mobile_ui/lib/pages/notes/notes_page.dart @@ -251,7 +251,7 @@ class NotesPageState extends State with TickerProviderStateMixin { name: firstName, backgroundColor: Theme.of(context) .colorScheme - .secondary, //ColorUtils.stringToColor(user.displayName ?? "?"), + .tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"), badge: updateProvider.available, role: user.role, profilePictureString: user.picture, diff --git a/refilc_mobile_ui/lib/pages/timetable/timetable_page.dart b/refilc_mobile_ui/lib/pages/timetable/timetable_page.dart index 470e793..f4bb86b 100644 --- a/refilc_mobile_ui/lib/pages/timetable/timetable_page.dart +++ b/refilc_mobile_ui/lib/pages/timetable/timetable_page.dart @@ -283,7 +283,7 @@ class TimetablePageState extends State name: firstName, backgroundColor: Theme.of(context) .colorScheme - .secondary, //ColorUtils.stringToColor(user.displayName ?? "?"), + .tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"), badge: updateProvider.available, role: user.role, profilePictureString: user.picture, diff --git a/refilc_mobile_ui/lib/screens/navigation/navbar_item.dart b/refilc_mobile_ui/lib/screens/navigation/navbar_item.dart index 3c38804..aed418a 100644 --- a/refilc_mobile_ui/lib/screens/navigation/navbar_item.dart +++ b/refilc_mobile_ui/lib/screens/navigation/navbar_item.dart @@ -34,7 +34,7 @@ class NavbarItem extends StatelessWidget { padding: const EdgeInsets.all(12.0), decoration: BoxDecoration( color: active - ? Theme.of(context).colorScheme.secondary.withOpacity(.2) + ? Theme.of(context).colorScheme.tertiary.withOpacity(.2) : null, borderRadius: BorderRadius.circular(14.0), ), diff --git a/refilc_mobile_ui/lib/screens/settings/accounts/account_view.dart b/refilc_mobile_ui/lib/screens/settings/accounts/account_view.dart index bcccc37..88057d7 100644 --- a/refilc_mobile_ui/lib/screens/settings/accounts/account_view.dart +++ b/refilc_mobile_ui/lib/screens/settings/accounts/account_view.dart @@ -30,7 +30,7 @@ class AccountView extends StatelessWidget { AccountTile( profileImage: ProfileImage( name: _firstName, - backgroundColor: Theme.of(context).colorScheme.secondary, + backgroundColor: Theme.of(context).colorScheme.tertiary, role: user.role, ), name: SelectableText( diff --git a/refilc_mobile_ui/lib/screens/settings/settings_screen.dart b/refilc_mobile_ui/lib/screens/settings/settings_screen.dart index 5442824..70967fb 100644 --- a/refilc_mobile_ui/lib/screens/settings/settings_screen.dart +++ b/refilc_mobile_ui/lib/screens/settings/settings_screen.dart @@ -136,7 +136,7 @@ class SettingsScreenState extends State profilePictureString: account.picture, backgroundColor: Theme.of(context) .colorScheme - .secondary, //!settings.presentationMode + .tertiary, //!settings.presentationMode //? ColorUtils.stringToColor(account.name) //: Theme.of(context).colorScheme.secondary, ),