From 2bcefe8dd04d31336600e993a17e68943fef2e6b Mon Sep 17 00:00:00 2001 From: 13732348243521734 <250190212+13732348243521734@users.noreply.github.com> Date: Sun, 6 Sep 2026 06:32:44 +0000 Subject: [PATCH] fix: hour-label column no longer overflows on longer labels Found in testing: the left-hand hour column (period label + start/end time, 3 stacked Text widgets) had a fixed height and could overflow when the label needed more than one line. Wrapped the content in FittedBox(fit: BoxFit.scaleDown) so it always scales down to fit instead of overflowing, regardless of label length. --- .../student_timetable_better_view.dart | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/lib/applets/timetable/student/student_timetable_better_view.dart b/lib/applets/timetable/student/student_timetable_better_view.dart index 43a3f564..9fc072a0 100644 --- a/lib/applets/timetable/student/student_timetable_better_view.dart +++ b/lib/applets/timetable/student/student_timetable_better_view.dart @@ -369,22 +369,26 @@ class TimeTableView extends StatelessWidget { height: row.type == TimeTableRowType.lesson ? itemHeight : pauseHeight, - child: Column( - children: [ - Text(row.label, style: TextStyle(fontSize: 12)), - ...(row.type == TimeTableRowType.lesson - ? [ - Text( - row.startTime.toFlutter().format(context), - style: TextStyle(fontSize: 10), - ), - Text( - row.endTime.toFlutter().format(context), - style: TextStyle(fontSize: 10), - ), - ] - : []), - ], + child: FittedBox( + fit: BoxFit.scaleDown, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text(row.label, style: TextStyle(fontSize: 12)), + ...(row.type == TimeTableRowType.lesson + ? [ + Text( + row.startTime.toFlutter().format(context), + style: TextStyle(fontSize: 10), + ), + Text( + row.endTime.toFlutter().format(context), + style: TextStyle(fontSize: 10), + ), + ] + : []), + ], + ), ), ), ],