fix: calendar dark mode UI fixes (#2353)

* chore: calendar dark mode UI fixes

* chore: bump calendar_view package version

* chore: adjust padding
This commit is contained in:
Richard Shiue 2023-04-29 16:25:43 +08:00 committed by GitHub
parent 2b1b1c0f28
commit 28f22e4d61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 10 deletions

View file

@ -66,7 +66,7 @@ class CalendarDayCard extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: _Header( child: _Header(
date: date, date: date,
isInMonth: isInMonth, isInMonth: isInMonth,
@ -215,10 +215,8 @@ class _NewEventButton extends StatelessWidget {
return FlowyIconButton( return FlowyIconButton(
onPressed: onClick, onPressed: onClick,
iconPadding: EdgeInsets.zero, iconPadding: EdgeInsets.zero,
icon: svgWidget( icon: const FlowySvg(name: "home/add"),
"home/add", hoverColor: AFThemeExtension.of(context).lightGreyHover,
color: Theme.of(context).iconTheme.color,
),
width: 22, width: 22,
); );
} }
@ -237,7 +235,7 @@ class _DayBadge extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
Color dayTextColor = Theme.of(context).colorScheme.onSurface; Color dayTextColor = Theme.of(context).colorScheme.onBackground;
String dayString = date.day == 1 String dayString = date.day == 1
? DateFormat('MMM d', context.locale.toLanguageTag()).format(date) ? DateFormat('MMM d', context.locale.toLanguageTag()).format(date)
: date.day.toString(); : date.day.toString();

View file

@ -137,7 +137,7 @@ class _CalendarPageState extends State<CalendarPage> {
FlowyIconButton( FlowyIconButton(
width: CalendarSize.navigatorButtonWidth, width: CalendarSize.navigatorButtonWidth,
height: CalendarSize.navigatorButtonHeight, height: CalendarSize.navigatorButtonHeight,
icon: svgWidget('home/arrow_left'), icon: const FlowySvg(name: 'home/arrow_left'),
tooltipText: LocaleKeys.calendar_navigation_previousMonth.tr(), tooltipText: LocaleKeys.calendar_navigation_previousMonth.tr(),
hoverColor: AFThemeExtension.of(context).lightGreyHover, hoverColor: AFThemeExtension.of(context).lightGreyHover,
onPressed: () => _calendarState?.currentState?.previousPage(), onPressed: () => _calendarState?.currentState?.previousPage(),
@ -155,7 +155,7 @@ class _CalendarPageState extends State<CalendarPage> {
FlowyIconButton( FlowyIconButton(
width: CalendarSize.navigatorButtonWidth, width: CalendarSize.navigatorButtonWidth,
height: CalendarSize.navigatorButtonHeight, height: CalendarSize.navigatorButtonHeight,
icon: svgWidget('home/arrow_right'), icon: const FlowySvg(name: 'home/arrow_right'),
tooltipText: LocaleKeys.calendar_navigation_nextMonth.tr(), tooltipText: LocaleKeys.calendar_navigation_nextMonth.tr(),
hoverColor: AFThemeExtension.of(context).lightGreyHover, hoverColor: AFThemeExtension.of(context).lightGreyHover,
onPressed: () => _calendarState?.currentState?.nextPage(), onPressed: () => _calendarState?.currentState?.nextPage(),

View file

@ -172,10 +172,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: calendar_view name: calendar_view
sha256: "7f2c460d38cda782e0852ca7706086c24f6e9407a9f0cfcdef034fb81e6d9f3e" sha256: "58a8b851ac0a2d62770fd06ad30f06683bd40848a5dd1a1eca332f5a6064bd82"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.2" version: "1.0.3"
characters: characters:
dependency: transitive dependency: transitive
description: description: