From fde6a47adc693f7fd38112d1e7a51898bfab460d Mon Sep 17 00:00:00 2001 From: Pearoo <63553775+rnxm@users.noreply.github.com> Date: Sat, 13 Sep 2025 22:55:55 +0200 Subject: [PATCH] fix(timetable): no more unexplainable padding --- .../ui/phone/pages/home/home_timetable.dart | 44 +++++++++++++------ .../ui/phone/screens/home/home_screen.dart | 3 +- 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/firka/lib/ui/phone/pages/home/home_timetable.dart b/firka/lib/ui/phone/pages/home/home_timetable.dart index 074f3655..0ba5b6f3 100644 --- a/firka/lib/ui/phone/pages/home/home_timetable.dart +++ b/firka/lib/ui/phone/pages/home/home_timetable.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:math'; import 'package:carousel_slider/carousel_slider.dart'; import 'package:firka/helpers/api/model/test.dart'; @@ -506,12 +507,16 @@ class _HomeTimetableScreen extends FirkaState TransparentPointer( child: SizedBox( width: MediaQuery.of(context).size.width, - height: MediaQuery.of(context).size.height / 1.4, + height: (MediaQuery.of(context).size.height / 1.251) - 12, + // dear future developers. i have no idea why this number + // magically makes the navbar just low enough so it doesn't + // overflow. i spent 3 hours on this. + // feel free to git blame me. - rnxm child: CarouselSlider( items: ttDays, carouselController: _controller, options: CarouselOptions( - height: MediaQuery.of(context).size.height / 1.36, + height: MediaQuery.of(context).size.height, viewportFraction: 1, enableInfiniteScroll: false, initialPage: active, @@ -524,18 +529,31 @@ class _HomeTimetableScreen extends FirkaState }); }), ))), - Stack( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: ttEmptyCards, + Container( + decoration: ShapeDecoration( + color: appStyle.colors.background, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(0), ), - TransparentPointer( - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: ttWidgets, - )), - ], + shadows: [ + BoxShadow( + color: appStyle.colors.background, + blurRadius: 20, + spreadRadius: 38, + ), + ], + ), + child: Stack( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: ttEmptyCards, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: ttWidgets), + ], + ), ), ], ) diff --git a/firka/lib/ui/phone/screens/home/home_screen.dart b/firka/lib/ui/phone/screens/home/home_screen.dart index 43834a9b..d0cd0566 100644 --- a/firka/lib/ui/phone/screens/home/home_screen.dart +++ b/firka/lib/ui/phone/screens/home/home_screen.dart @@ -465,8 +465,7 @@ class _HomeScreenState extends FirkaState { ), width: MediaQuery.of(context).size.width, child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: 55, vertical: 15), + padding: const EdgeInsets.fromLTRB(55, 0, 55, 12), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [