forked from firka/student-legacy
Revert "git things"
This reverts commit 1b95afdfc23cb907a2659fb6c1ea316b2efc9e3e.
This commit is contained in:
parent
ca177ad69f
commit
d0599bed7d
@ -83,7 +83,8 @@ class AppTheme {
|
|||||||
accentColor == AccentColor.ogfilc) ||
|
accentColor == AccentColor.ogfilc) ||
|
||||||
!settings.newColors
|
!settings.newColors
|
||||||
? accent
|
? accent
|
||||||
: ColorsUtils().darken(accent, amount: 0.5);
|
: ColorsUtils().darken(accent,
|
||||||
|
amount: 0.4); // white mode: same tertiary as secondary
|
||||||
|
|
||||||
return ThemeData(
|
return ThemeData(
|
||||||
brightness: Brightness.light,
|
brightness: Brightness.light,
|
||||||
@ -186,14 +187,15 @@ class AppTheme {
|
|||||||
accentColor == AccentColor.ogfilc) ||
|
accentColor == AccentColor.ogfilc) ||
|
||||||
!settings.newColors
|
!settings.newColors
|
||||||
? accent
|
? accent
|
||||||
: ColorsUtils().lighten(accent, amount: 0.1);
|
: ColorsUtils().lighten(accent, amount: 0.3);
|
||||||
// Color newScaffoldBg = ColorsUtils().lighten(accent, amount: 0.4);
|
// Color newScaffoldBg = ColorsUtils().lighten(accent, amount: 0.4);
|
||||||
Color newTertiary = (accentColor == AccentColor.adaptive ||
|
Color newTertiary = (accentColor == AccentColor.adaptive ||
|
||||||
accentColor == AccentColor.custom ||
|
accentColor == AccentColor.custom ||
|
||||||
accentColor == AccentColor.ogfilc) ||
|
accentColor == AccentColor.ogfilc) ||
|
||||||
!settings.newColors
|
!settings.newColors
|
||||||
? accent
|
? accent
|
||||||
: ColorsUtils().lighten(accent, amount: 0.4);
|
: ColorsUtils().darken(accent,
|
||||||
|
amount: 0.1); // dark mode: tertiary is way darker than secondary
|
||||||
|
|
||||||
return ThemeData(
|
return ThemeData(
|
||||||
brightness: Brightness.dark,
|
brightness: Brightness.dark,
|
||||||
|
@ -61,7 +61,7 @@ class _FilterBarState extends State<FilterBar> {
|
|||||||
indicatorSize: TabBarIndicatorSize.tab,
|
indicatorSize: TabBarIndicatorSize.tab,
|
||||||
indicatorPadding: const EdgeInsets.symmetric(vertical: 8.0),
|
indicatorPadding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||||
indicator: BoxDecoration(
|
indicator: BoxDecoration(
|
||||||
color: Theme.of(context).colorScheme.secondary.withOpacity(.2),
|
color: Theme.of(context).colorScheme.tertiary.withOpacity(.2),
|
||||||
borderRadius: BorderRadius.circular(45.0),
|
borderRadius: BorderRadius.circular(45.0),
|
||||||
),
|
),
|
||||||
overlayColor: MaterialStateProperty.all(const Color(0x00000000)),
|
overlayColor: MaterialStateProperty.all(const Color(0x00000000)),
|
||||||
|
@ -58,7 +58,7 @@ class ProfileButton extends StatelessWidget {
|
|||||||
return ProfileImage(
|
return ProfileImage(
|
||||||
backgroundColor: !pMode
|
backgroundColor: !pMode
|
||||||
? child.backgroundColor
|
? child.backgroundColor
|
||||||
: Theme.of(context).colorScheme.secondary,
|
: Theme.of(context).colorScheme.tertiary,
|
||||||
heroTag: child.heroTag,
|
heroTag: child.heroTag,
|
||||||
key: child.key,
|
key: child.key,
|
||||||
name: !pMode ? child.name : "János",
|
name: !pMode ? child.name : "János",
|
||||||
|
@ -165,7 +165,7 @@ class AbsencesPageState extends State<AbsencesPage>
|
|||||||
name: firstName,
|
name: firstName,
|
||||||
backgroundColor: Theme.of(context)
|
backgroundColor: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.secondary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
||||||
badge: updateProvider.available,
|
badge: updateProvider.available,
|
||||||
role: user.role,
|
role: user.role,
|
||||||
profilePictureString: user.picture,
|
profilePictureString: user.picture,
|
||||||
|
@ -147,8 +147,8 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
|
|||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
|
||||||
tiles.addAll(
|
if (!gradeCalcMode) {
|
||||||
[
|
tiles.addAll([
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 5.0,
|
height: 5.0,
|
||||||
),
|
),
|
||||||
@ -162,8 +162,8 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
|
|||||||
controller: _tabController,
|
controller: _tabController,
|
||||||
disableFading: true,
|
disableFading: true,
|
||||||
),
|
),
|
||||||
],
|
]);
|
||||||
);
|
}
|
||||||
|
|
||||||
if (showGraph(subjectGrades) && _tabController.index == 0) {
|
if (showGraph(subjectGrades) && _tabController.index == 0) {
|
||||||
tiles.add(gradeGraph);
|
tiles.add(gradeGraph);
|
||||||
@ -380,13 +380,31 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
|
|||||||
.where((e) => e.type == GradeType.midYear)
|
.where((e) => e.type == GradeType.midYear)
|
||||||
.isNotEmpty,
|
.isNotEmpty,
|
||||||
child: ExpandableFab(
|
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,
|
type: ExpandableFabType.up,
|
||||||
distance: 50,
|
distance: 50,
|
||||||
childrenOffset: const Offset(-3.8, 0.0),
|
// childrenOffset: const Offset(-8.8, 0.0),
|
||||||
children: [
|
children: [
|
||||||
FloatingActionButton.small(
|
FloatingActionButton.small(
|
||||||
heroTag: "btn_ghost_grades",
|
heroTag: "btn_ghost_grades",
|
||||||
backgroundColor: Theme.of(context).colorScheme.secondary,
|
backgroundColor: Theme.of(context).colorScheme.tertiary,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
gradeCalc(context);
|
gradeCalc(context);
|
||||||
},
|
},
|
||||||
@ -394,7 +412,7 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
|
|||||||
),
|
),
|
||||||
FloatingActionButton.small(
|
FloatingActionButton.small(
|
||||||
heroTag: "btn_goal_planner",
|
heroTag: "btn_goal_planner",
|
||||||
backgroundColor: Theme.of(context).colorScheme.secondary,
|
backgroundColor: Theme.of(context).colorScheme.tertiary,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
// if (!Provider.of<PlusProvider>(context, listen: false)
|
// if (!Provider.of<PlusProvider>(context, listen: false)
|
||||||
// .hasScope(PremiumScopes.goalPlanner)) {
|
// .hasScope(PremiumScopes.goalPlanner)) {
|
||||||
@ -533,6 +551,10 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
|
|||||||
elevation: 12.0,
|
elevation: 12.0,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// set tab
|
||||||
|
int tabIndex = _tabController.index;
|
||||||
|
_tabController.animateTo(0);
|
||||||
|
|
||||||
// Hide the fab and grades
|
// Hide the fab and grades
|
||||||
setState(() {
|
setState(() {
|
||||||
gradeCalcMode = true;
|
gradeCalcMode = true;
|
||||||
@ -541,6 +563,9 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
|
|||||||
_sheetController!.closed.then((value) {
|
_sheetController!.closed.then((value) {
|
||||||
// Show fab and grades
|
// Show fab and grades
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
|
// set tab
|
||||||
|
_tabController.animateTo(tabIndex);
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
gradeCalcMode = false;
|
gradeCalcMode = false;
|
||||||
});
|
});
|
||||||
|
@ -546,7 +546,7 @@ class GradesPageState extends State<GradesPage> {
|
|||||||
name: firstName,
|
name: firstName,
|
||||||
backgroundColor: Theme.of(context)
|
backgroundColor: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.secondary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
||||||
badge: updateProvider.available,
|
badge: updateProvider.available,
|
||||||
role: user.role,
|
role: user.role,
|
||||||
profilePictureString: user.picture,
|
profilePictureString: user.picture,
|
||||||
|
@ -307,7 +307,7 @@ class HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||||||
name: firstName,
|
name: firstName,
|
||||||
backgroundColor: Theme.of(context)
|
backgroundColor: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.secondary, //!settings.presentationMode
|
.tertiary, //!settings.presentationMode
|
||||||
//? ColorUtils.stringToColor(user.displayName ?? "?")
|
//? ColorUtils.stringToColor(user.displayName ?? "?")
|
||||||
//: Theme.of(context).colorScheme.secondary,
|
//: Theme.of(context).colorScheme.secondary,
|
||||||
badge: updateProvider.available,
|
badge: updateProvider.available,
|
||||||
|
@ -105,7 +105,7 @@ class MessagesPageState extends State<MessagesPage>
|
|||||||
name: firstName,
|
name: firstName,
|
||||||
backgroundColor: Theme.of(context)
|
backgroundColor: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.secondary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
||||||
badge: updateProvider.available,
|
badge: updateProvider.available,
|
||||||
role: user.role,
|
role: user.role,
|
||||||
profilePictureString: user.picture,
|
profilePictureString: user.picture,
|
||||||
|
@ -251,7 +251,7 @@ class NotesPageState extends State<NotesPage> with TickerProviderStateMixin {
|
|||||||
name: firstName,
|
name: firstName,
|
||||||
backgroundColor: Theme.of(context)
|
backgroundColor: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.secondary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
||||||
badge: updateProvider.available,
|
badge: updateProvider.available,
|
||||||
role: user.role,
|
role: user.role,
|
||||||
profilePictureString: user.picture,
|
profilePictureString: user.picture,
|
||||||
|
@ -283,7 +283,7 @@ class TimetablePageState extends State<TimetablePage>
|
|||||||
name: firstName,
|
name: firstName,
|
||||||
backgroundColor: Theme.of(context)
|
backgroundColor: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.secondary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
||||||
badge: updateProvider.available,
|
badge: updateProvider.available,
|
||||||
role: user.role,
|
role: user.role,
|
||||||
profilePictureString: user.picture,
|
profilePictureString: user.picture,
|
||||||
|
@ -34,7 +34,7 @@ class NavbarItem extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.all(12.0),
|
padding: const EdgeInsets.all(12.0),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: active
|
color: active
|
||||||
? Theme.of(context).colorScheme.secondary.withOpacity(.2)
|
? Theme.of(context).colorScheme.tertiary.withOpacity(.2)
|
||||||
: null,
|
: null,
|
||||||
borderRadius: BorderRadius.circular(14.0),
|
borderRadius: BorderRadius.circular(14.0),
|
||||||
),
|
),
|
||||||
|
@ -30,7 +30,7 @@ class AccountView extends StatelessWidget {
|
|||||||
AccountTile(
|
AccountTile(
|
||||||
profileImage: ProfileImage(
|
profileImage: ProfileImage(
|
||||||
name: _firstName,
|
name: _firstName,
|
||||||
backgroundColor: Theme.of(context).colorScheme.secondary,
|
backgroundColor: Theme.of(context).colorScheme.tertiary,
|
||||||
role: user.role,
|
role: user.role,
|
||||||
),
|
),
|
||||||
name: SelectableText(
|
name: SelectableText(
|
||||||
|
@ -136,7 +136,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
|||||||
profilePictureString: account.picture,
|
profilePictureString: account.picture,
|
||||||
backgroundColor: Theme.of(context)
|
backgroundColor: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.secondary, //!settings.presentationMode
|
.tertiary, //!settings.presentationMode
|
||||||
//? ColorUtils.stringToColor(account.name)
|
//? ColorUtils.stringToColor(account.name)
|
||||||
//: Theme.of(context).colorScheme.secondary,
|
//: Theme.of(context).colorScheme.secondary,
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user