From 5860d35d1a51f0cf2722ae6b6bec274d6952097c Mon Sep 17 00:00:00 2001 From: Richard Shiue <71320345+richardshiue@users.noreply.github.com> Date: Thu, 6 Oct 2022 21:36:39 +0800 Subject: [PATCH] fix: improve look of calendar (#1226) --- .../widgets/cell/date_cell/date_editor.dart | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/date_cell/date_editor.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/date_cell/date_editor.dart index 4018c0acb6..672e0e648e 100644 --- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/date_cell/date_editor.dart +++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/date_cell/date_editor.dart @@ -159,6 +159,7 @@ class _CellCalendarWidgetState extends State<_CellCalendarWidget> { focusedDay: state.focusedDay, rowHeight: 40, calendarFormat: state.format, + daysOfWeekHeight: 40, headerStyle: HeaderStyle( formatButtonVisible: false, titleCentered: true, @@ -168,6 +169,7 @@ class _CellCalendarWidgetState extends State<_CellCalendarWidget> { rightChevronPadding: EdgeInsets.zero, rightChevronMargin: EdgeInsets.zero, rightChevronIcon: svgWidget("home/arrow_right"), + headerMargin: const EdgeInsets.only(bottom: 8.0), ), daysOfWeekStyle: DaysOfWeekStyle( dowTextFormatter: (date, locale) => @@ -182,13 +184,31 @@ class _CellCalendarWidgetState extends State<_CellCalendarWidget> { ), ), calendarStyle: CalendarStyle( + cellMargin: const EdgeInsets.all(3), + defaultDecoration: BoxDecoration( + color: theme.surface, + shape: BoxShape.rectangle, + borderRadius: const BorderRadius.all(Radius.circular(6)), + ), selectedDecoration: BoxDecoration( color: theme.main1, - shape: BoxShape.circle, + shape: BoxShape.rectangle, + borderRadius: const BorderRadius.all(Radius.circular(6)), ), todayDecoration: BoxDecoration( color: theme.shader4, - shape: BoxShape.circle, + shape: BoxShape.rectangle, + borderRadius: const BorderRadius.all(Radius.circular(6)), + ), + weekendDecoration: BoxDecoration( + color: theme.surface, + shape: BoxShape.rectangle, + borderRadius: const BorderRadius.all(Radius.circular(6)), + ), + outsideDecoration: BoxDecoration( + color: theme.surface, + shape: BoxShape.rectangle, + borderRadius: const BorderRadius.all(Radius.circular(6)), ), selectedTextStyle: TextStyle( color: theme.surface,