From d9d221287df4859eb58f053df7b85d059767a206 Mon Sep 17 00:00:00 2001 From: Fabian Date: Tue, 16 Jan 2024 13:15:01 +0100 Subject: [PATCH 1/2] Quiz Scoreboard max width --- frontend/lib/pages/quiz/quiz_control_page.dart | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/frontend/lib/pages/quiz/quiz_control_page.dart b/frontend/lib/pages/quiz/quiz_control_page.dart index 2eb682c5..acb19e3c 100644 --- a/frontend/lib/pages/quiz/quiz_control_page.dart +++ b/frontend/lib/pages/quiz/quiz_control_page.dart @@ -261,10 +261,15 @@ class _QuizControlPageState extends State { style: Theme.of(context).textTheme.headlineMedium, ), const SizedBox(height: 16), - Card( - child: Padding( - padding: const EdgeInsets.all(8), - child: QuizScoreboard(scoreboard: _scoreboard), + Center( + child: Container( + constraints: const BoxConstraints(maxWidth: 800), + child: Card( + child: Padding( + padding: const EdgeInsets.all(8), + child: QuizScoreboard(scoreboard: _scoreboard), + ), + ), ), ), const SizedBox(height: 16), From 61b77cab8fd49bd915711c75451d8d810d0f691c Mon Sep 17 00:00:00 2001 From: Fabian Date: Tue, 16 Jan 2024 13:17:36 +0100 Subject: [PATCH 2/2] Home on large Screen (temp) --- frontend/lib/tabs/home_tab.dart | 101 ++++++++++++++++---------------- 1 file changed, 52 insertions(+), 49 deletions(-) diff --git a/frontend/lib/tabs/home_tab.dart b/frontend/lib/tabs/home_tab.dart index 57770449..2b51192c 100644 --- a/frontend/lib/tabs/home_tab.dart +++ b/frontend/lib/tabs/home_tab.dart @@ -57,62 +57,65 @@ class _HomeTabState extends State { return Scaffold( body: SafeArea( child: SingleChildScrollView( - child: Column( - children: [ - GridView.count( - crossAxisCount: 2, - crossAxisSpacing: 10, - shrinkWrap: true, + child: Center( + child: Container( + constraints: const BoxConstraints(maxWidth: 600), + child: Column( children: [ - MyCard( - title: 'Events', - cardColor: colors.surfaceVariant, - imageName: events), - MyCard( - title: 'Mensa', - cardColor: colors.surfaceVariant, - imageName: mensa), - MyCard( - title: 'LSF', - cardColor: colors.surfaceVariant, - imageName: calendar, + GridView.count( + crossAxisCount: 2, + crossAxisSpacing: 10, + shrinkWrap: true, + children: [ + MyCard( + title: 'Events', + cardColor: colors.surfaceVariant, + imageName: events), + MyCard( + title: 'Mensa', + cardColor: colors.surfaceVariant, + imageName: mensa), + MyCard( + title: 'LSF', + cardColor: colors.surfaceVariant, + imageName: calendar, + ), + MyCard( + title: 'Noten', + cardColor: colors.surfaceVariant, + imageName: analytics, + ), + ], ), - MyCard( - title: 'Noten', - cardColor: colors.surfaceVariant, - imageName: analytics, - ), - ], - ), - Container( - decoration: BoxDecoration( - color: colors.outlineVariant, - borderRadius: const BorderRadius.only( - topLeft: Radius.circular(20), - topRight: Radius.circular(20))), - width: screenWidth, - height: 200, - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Row( + Container( + decoration: BoxDecoration( + color: colors.outlineVariant, + borderRadius: const BorderRadius.all(Radius.circular(20))), + width: screenWidth, + height: 200, + child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - _buildColumn('Gegebene Feedbacks', '12'), - _buildColumn('Absolvierte Quizze', '55'), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _buildColumn('Gegebene Feedbacks', '12'), + _buildColumn('Absolvierte Quizze', '55'), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _buildColumn('Ø Quiz-Position', '4'), + _buildColumn('Alle Feedbacks ', '1923'), + ], + ), ], ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - _buildColumn('Ø Quiz-Position', '4'), - _buildColumn('Alle Feedbacks ', '1923'), - ], - ), - ], - ), + ), + ], ), - ], + ), ), ), ),