From 4ed3cfc90e8816eab3b02283815784c54a0f5398 Mon Sep 17 00:00:00 2001 From: Kima Date: Thu, 25 Jan 2024 19:22:01 +0100 Subject: [PATCH] fixed grade counter maybe and other visual bugs --- .../lib/common/widgets/event/event_tile.dart | 47 +++++++++++-------- .../lib/pages/grades/grades_count.dart | 7 ++- .../lib/pages/grades/grades_count_item.dart | 2 +- 3 files changed, 31 insertions(+), 25 deletions(-) diff --git a/filcnaplo_mobile_ui/lib/common/widgets/event/event_tile.dart b/filcnaplo_mobile_ui/lib/common/widgets/event/event_tile.dart index 807c17e..24b068e 100755 --- a/filcnaplo_mobile_ui/lib/common/widgets/event/event_tile.dart +++ b/filcnaplo_mobile_ui/lib/common/widgets/event/event_tile.dart @@ -17,28 +17,35 @@ class EventTile extends StatelessWidget { borderRadius: BorderRadius.circular(14.0), child: Padding( padding: padding ?? const EdgeInsets.symmetric(horizontal: 8.0), - child: ListTile( - visualDensity: VisualDensity.compact, - contentPadding: const EdgeInsets.only(left: 8.0, right: 12.0), - onTap: onTap, - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14.0)), - leading: const ProfileImage( - name: "!", - radius: 22.0, + child: Theme( + data: Theme.of(context).copyWith( + highlightColor: Colors.transparent, + splashColor: Colors.transparent, ), - title: Text( - event.title, - maxLines: 2, - overflow: TextOverflow.ellipsis, - style: const TextStyle(fontWeight: FontWeight.w600), + child: ListTile( + visualDensity: VisualDensity.compact, + contentPadding: const EdgeInsets.only(left: 8.0, right: 12.0), + onTap: onTap, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(14.0)), + leading: const ProfileImage( + name: "!", + radius: 19.2, + ), + title: Text( + event.title, + maxLines: 2, + overflow: TextOverflow.ellipsis, + style: const TextStyle(fontWeight: FontWeight.w600), + ), + subtitle: Text( + event.content.escapeHtml().replaceAll('\n', ' '), + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: const TextStyle(fontWeight: FontWeight.w500), + ), + minLeadingWidth: 0, ), - subtitle: Text( - event.content.escapeHtml().replaceAll('\n', ' '), - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: const TextStyle(fontWeight: FontWeight.w500), - ), - minLeadingWidth: 0, ), ), ); diff --git a/filcnaplo_mobile_ui/lib/pages/grades/grades_count.dart b/filcnaplo_mobile_ui/lib/pages/grades/grades_count.dart index c6917b4..5dd5274 100755 --- a/filcnaplo_mobile_ui/lib/pages/grades/grades_count.dart +++ b/filcnaplo_mobile_ui/lib/pages/grades/grades_count.dart @@ -14,8 +14,7 @@ class GradesCount extends StatelessWidget { (int index) => grades.where((e) => e.value.value == index + 1).length); return Padding( - padding: - const EdgeInsets.only(bottom: 6.0, top: 6.0, left: 12.0, right: 6.0), + padding: const EdgeInsets.all(6.0), child: IntrinsicHeight( child: Row( mainAxisAlignment: MainAxisAlignment.center, @@ -52,10 +51,10 @@ class GradesCount extends StatelessWidget { ), ), Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: gradesCount .mapIndexed((index, e) => Padding( - padding: const EdgeInsets.only(left: 10.0), + padding: const EdgeInsets.only(left: 9.69), child: GradesCountItem(count: e, value: index + 1))) .toList(), ), diff --git a/filcnaplo_mobile_ui/lib/pages/grades/grades_count_item.dart b/filcnaplo_mobile_ui/lib/pages/grades/grades_count_item.dart index 886ceed..c7a046f 100755 --- a/filcnaplo_mobile_ui/lib/pages/grades/grades_count_item.dart +++ b/filcnaplo_mobile_ui/lib/pages/grades/grades_count_item.dart @@ -27,7 +27,7 @@ class GradesCountItem extends StatelessWidget { ), const SizedBox(width: 3.0), GradeValueWidget(GradeValue(value, "Value", "Value", 100), - size: 19.0, fill: true, shadow: false), + size: 18.0, fill: true, shadow: false), ], ); }