git things

This commit is contained in:
zypherift 2024-04-28 23:04:23 +02:00
parent 57a4c65d2c
commit 1b95afdfc2
13 changed files with 21 additions and 48 deletions

View File

@ -83,8 +83,7 @@ class AppTheme {
accentColor == AccentColor.ogfilc) ||
!settings.newColors
? accent
: ColorsUtils().darken(accent,
amount: 0.4); // white mode: same tertiary as secondary
: ColorsUtils().darken(accent, amount: 0.5);
return ThemeData(
brightness: Brightness.light,
@ -187,15 +186,14 @@ class AppTheme {
accentColor == AccentColor.ogfilc) ||
!settings.newColors
? accent
: ColorsUtils().lighten(accent, amount: 0.3);
: ColorsUtils().lighten(accent, amount: 0.1);
// Color newScaffoldBg = ColorsUtils().lighten(accent, amount: 0.4);
Color newTertiary = (accentColor == AccentColor.adaptive ||
accentColor == AccentColor.custom ||
accentColor == AccentColor.ogfilc) ||
!settings.newColors
? accent
: ColorsUtils().darken(accent,
amount: 0.1); // dark mode: tertiary is way darker than secondary
: ColorsUtils().lighten(accent, amount: 0.4);
return ThemeData(
brightness: Brightness.dark,

View File

@ -61,7 +61,7 @@ class _FilterBarState extends State<FilterBar> {
indicatorSize: TabBarIndicatorSize.tab,
indicatorPadding: const EdgeInsets.symmetric(vertical: 8.0),
indicator: BoxDecoration(
color: Theme.of(context).colorScheme.tertiary.withOpacity(.2),
color: Theme.of(context).colorScheme.secondary.withOpacity(.2),
borderRadius: BorderRadius.circular(45.0),
),
overlayColor: MaterialStateProperty.all(const Color(0x00000000)),

View File

@ -58,7 +58,7 @@ class ProfileButton extends StatelessWidget {
return ProfileImage(
backgroundColor: !pMode
? child.backgroundColor
: Theme.of(context).colorScheme.tertiary,
: Theme.of(context).colorScheme.secondary,
heroTag: child.heroTag,
key: child.key,
name: !pMode ? child.name : "János",

View File

@ -165,7 +165,7 @@ class AbsencesPageState extends State<AbsencesPage>
name: firstName,
backgroundColor: Theme.of(context)
.colorScheme
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
.secondary, //ColorUtils.stringToColor(user.displayName ?? "?"),
badge: updateProvider.available,
role: user.role,
profilePictureString: user.picture,

View File

@ -147,8 +147,8 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
),
));
if (!gradeCalcMode) {
tiles.addAll([
tiles.addAll(
[
const SizedBox(
height: 5.0,
),
@ -162,8 +162,8 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
controller: _tabController,
disableFading: true,
),
]);
}
],
);
if (showGraph(subjectGrades) && _tabController.index == 0) {
tiles.add(gradeGraph);
@ -380,31 +380,13 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
.where((e) => e.type == GradeType.midYear)
.isNotEmpty,
child: ExpandableFab(
openButtonBuilder: FloatingActionButtonBuilder(
size: 20.0,
builder: (context, onPressed, progress) =>
FloatingActionButton.small(
onPressed: onPressed,
backgroundColor: Theme.of(context).colorScheme.tertiary,
child: const Icon(Icons.more_horiz_outlined),
),
),
closeButtonBuilder: FloatingActionButtonBuilder(
size: 20.0,
builder: (context, onPressed, progress) =>
FloatingActionButton.small(
onPressed: onPressed,
backgroundColor: Theme.of(context).colorScheme.tertiary,
child: const Icon(Icons.close),
),
),
type: ExpandableFabType.up,
distance: 50,
// childrenOffset: const Offset(-8.8, 0.0),
childrenOffset: const Offset(-3.8, 0.0),
children: [
FloatingActionButton.small(
heroTag: "btn_ghost_grades",
backgroundColor: Theme.of(context).colorScheme.tertiary,
backgroundColor: Theme.of(context).colorScheme.secondary,
onPressed: () {
gradeCalc(context);
},
@ -412,7 +394,7 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
),
FloatingActionButton.small(
heroTag: "btn_goal_planner",
backgroundColor: Theme.of(context).colorScheme.tertiary,
backgroundColor: Theme.of(context).colorScheme.secondary,
onPressed: () {
// if (!Provider.of<PlusProvider>(context, listen: false)
// .hasScope(PremiumScopes.goalPlanner)) {
@ -551,10 +533,6 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
elevation: 12.0,
);
// set tab
int tabIndex = _tabController.index;
_tabController.animateTo(0);
// Hide the fab and grades
setState(() {
gradeCalcMode = true;
@ -563,9 +541,6 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
_sheetController!.closed.then((value) {
// Show fab and grades
if (mounted) {
// set tab
_tabController.animateTo(tabIndex);
setState(() {
gradeCalcMode = false;
});

View File

@ -546,7 +546,7 @@ class GradesPageState extends State<GradesPage> {
name: firstName,
backgroundColor: Theme.of(context)
.colorScheme
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
.secondary, //ColorUtils.stringToColor(user.displayName ?? "?"),
badge: updateProvider.available,
role: user.role,
profilePictureString: user.picture,

View File

@ -307,7 +307,7 @@ class HomePageState extends State<HomePage> with TickerProviderStateMixin {
name: firstName,
backgroundColor: Theme.of(context)
.colorScheme
.tertiary, //!settings.presentationMode
.secondary, //!settings.presentationMode
//? ColorUtils.stringToColor(user.displayName ?? "?")
//: Theme.of(context).colorScheme.secondary,
badge: updateProvider.available,

View File

@ -105,7 +105,7 @@ class MessagesPageState extends State<MessagesPage>
name: firstName,
backgroundColor: Theme.of(context)
.colorScheme
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
.secondary, //ColorUtils.stringToColor(user.displayName ?? "?"),
badge: updateProvider.available,
role: user.role,
profilePictureString: user.picture,

View File

@ -251,7 +251,7 @@ class NotesPageState extends State<NotesPage> with TickerProviderStateMixin {
name: firstName,
backgroundColor: Theme.of(context)
.colorScheme
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
.secondary, //ColorUtils.stringToColor(user.displayName ?? "?"),
badge: updateProvider.available,
role: user.role,
profilePictureString: user.picture,

View File

@ -283,7 +283,7 @@ class TimetablePageState extends State<TimetablePage>
name: firstName,
backgroundColor: Theme.of(context)
.colorScheme
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
.secondary, //ColorUtils.stringToColor(user.displayName ?? "?"),
badge: updateProvider.available,
role: user.role,
profilePictureString: user.picture,

View File

@ -34,7 +34,7 @@ class NavbarItem extends StatelessWidget {
padding: const EdgeInsets.all(12.0),
decoration: BoxDecoration(
color: active
? Theme.of(context).colorScheme.tertiary.withOpacity(.2)
? Theme.of(context).colorScheme.secondary.withOpacity(.2)
: null,
borderRadius: BorderRadius.circular(14.0),
),

View File

@ -30,7 +30,7 @@ class AccountView extends StatelessWidget {
AccountTile(
profileImage: ProfileImage(
name: _firstName,
backgroundColor: Theme.of(context).colorScheme.tertiary,
backgroundColor: Theme.of(context).colorScheme.secondary,
role: user.role,
),
name: SelectableText(

View File

@ -136,7 +136,7 @@ class SettingsScreenState extends State<SettingsScreen>
profilePictureString: account.picture,
backgroundColor: Theme.of(context)
.colorScheme
.tertiary, //!settings.presentationMode
.secondary, //!settings.presentationMode
//? ColorUtils.stringToColor(account.name)
//: Theme.of(context).colorScheme.secondary,
),