diff --git a/lib/index.dart b/lib/index.dart index a693e33b..aed36fb8 100644 --- a/lib/index.dart +++ b/lib/index.dart @@ -13,6 +13,8 @@ import 'package:mimir/school/i18n.dart' as $school; import 'package:mimir/life/i18n.dart' as $life; import 'package:mimir/game/i18n.dart' as $game; import 'package:mimir/me/i18n.dart' as $me; +import 'package:mimir/timetable/p13n/entity/background.dart'; +import 'package:mimir/timetable/widget/timetable/background.dart'; // import 'package:mimir/backend/forum/i18n.dart' as $forum; import 'package:rettulf/rettulf.dart'; @@ -110,14 +112,30 @@ class _MainStagePageState extends ConsumerState { @override Widget build(BuildContext context) { + return buildBody(); + return [ + Positioned.fill( + child: ColoredBox(color: context.colorScheme.surface), + ), + Positioned.fill( + child: TimetableBackground( + background: Settings.timetable.backgroundImage ?? BackgroundImage.disabled(), + ), + ), + buildBody(), + ].stack(); + } + Widget buildBody() { final items = buildItems(); if (context.isPortrait) { return Scaffold( + // backgroundColor: Colors.transparent, body: widget.navigationShell, bottomNavigationBar: buildNavigationBar(items), ); } else { return Scaffold( + // backgroundColor: Colors.transparent, body: [ buildNavigationRail(items), const VerticalDivider(), @@ -129,6 +147,7 @@ class _MainStagePageState extends ConsumerState { Widget buildNavigationBar(NavigationItems items) { return NavigationBar( + // backgroundColor: context.colorScheme.surfaceContainer.withOpacity(0.6), selectedIndex: getSelectedIndex(items), onDestinationSelected: (index) => onItemTapped(index, items), destinations: items.map((e) => e.item.toBarItem()).toList(), @@ -137,6 +156,7 @@ class _MainStagePageState extends ConsumerState { Widget buildNavigationRail(NavigationItems items) { return NavigationRail( + // backgroundColor: context.colorScheme.surfaceContainer.withOpacity(0.6), labelType: NavigationRailLabelType.all, selectedIndex: getSelectedIndex(items), onDestinationSelected: (index) => onItemTapped(index, items), diff --git a/lib/timetable/page/timetable.dart b/lib/timetable/page/timetable.dart index f70a32e2..a94d9d8a 100644 --- a/lib/timetable/page/timetable.dart +++ b/lib/timetable/page/timetable.dart @@ -58,8 +58,10 @@ class _TimetableBoardPageState extends ConsumerState { @override Widget build(BuildContext context) { return Scaffold( + // backgroundColor: Colors.transparent, resizeToAvoidBottomInset: false, appBar: AppBar( + // backgroundColor: context.colorScheme.surface.withOpacity(0.6), title: $currentPos >> (ctx, pos) => i18n.weekOrderedName(number: pos.weekIndex + 1).text(), actions: [ buildSwitchViewButton(),