diff --git a/frontend/appflowy_flutter/lib/plugins/database_view/calendar/presentation/calendar_day.dart b/frontend/appflowy_flutter/lib/plugins/database_view/calendar/presentation/calendar_day.dart index ffd5004540..a2b40e8757 100644 --- a/frontend/appflowy_flutter/lib/plugins/database_view/calendar/presentation/calendar_day.dart +++ b/frontend/appflowy_flutter/lib/plugins/database_view/calendar/presentation/calendar_day.dart @@ -10,6 +10,7 @@ import 'package:flowy_infra/image.dart'; import 'package:flowy_infra/size.dart'; import 'package:flowy_infra/theme_extension.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart'; +import 'package:flowy_infra_ui/style_widget/hover.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -100,7 +101,7 @@ class CalendarDayCard extends StatelessWidget { ); } - GestureDetector _buildCard(BuildContext context, CalendarDayEvent event) { + Widget _buildCard(BuildContext context, CalendarDayEvent event) { final styles = { FieldType.Number: NumberCardCellStyle(10), FieldType.URL: URLCardCellStyle(10), @@ -122,6 +123,7 @@ class CalendarDayCard extends StatelessWidget { child: FlowyText.medium( cellData, textAlign: TextAlign.left, + color: Theme.of(context).colorScheme.onBackground, fontSize: 11, maxLines: null, // Enable multiple lines ), @@ -191,12 +193,8 @@ class CalendarDayCard extends StatelessWidget { cardData: event.dateFieldId, isEditing: false, cellBuilder: cellBuilder, - openCard: (context) => showEventDetails( - context: context, - event: event, - viewId: viewId, - rowCache: _rowCache, - ), + //Since we already have [showEventDetails] in calendar_day.dart, we don't need to implement it here again. + openCard: (_) {}, styleConfiguration: const RowCardStyleConfiguration( showAccessory: false, cellPadding: EdgeInsets.zero, @@ -206,15 +204,17 @@ class CalendarDayCard extends StatelessWidget { onEndEditing: () {}, ); - return GestureDetector( + return InkWell( onTap: () => showEventDetails( context: context, event: event, viewId: viewId, rowCache: _rowCache, ), - child: MouseRegion( - cursor: SystemMouseCursors.click, + child: FlowyHover( + style: HoverStyle( + hoverColor: Theme.of(context).colorScheme.tertiaryContainer, + ), child: Container( padding: const EdgeInsets.symmetric(horizontal: 2), decoration: BoxDecoration( diff --git a/frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/card.dart b/frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/card.dart index 78fa3ce976..e8c9dc9234 100644 --- a/frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/card.dart +++ b/frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/card.dart @@ -141,7 +141,6 @@ class _RowCardState extends State> { } }, openAccessory: _handleOpenAccessory, - openCard: (context) => widget.openCard(context), child: _CardContent( rowNotifier: rowNotifier, cellBuilder: widget.cellBuilder, diff --git a/frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/container/card_container.dart b/frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/container/card_container.dart index 01d6189307..b8d8b511a5 100644 --- a/frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/container/card_container.dart +++ b/frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/container/card_container.dart @@ -8,11 +8,9 @@ class RowCardContainer extends StatelessWidget { final Widget child; final CardAccessoryBuilder? accessoryBuilder; final bool Function()? buildAccessoryWhen; - final void Function(BuildContext) openCard; final void Function(AccessoryType) openAccessory; const RowCardContainer({ required this.child, - required this.openCard, required this.openAccessory, this.accessoryBuilder, this.buildAccessoryWhen, @@ -42,15 +40,10 @@ class RowCardContainer extends StatelessWidget { } } - return GestureDetector( - onTap: () => openCard(context), - child: Padding( - padding: const EdgeInsets.all(8), - child: ConstrainedBox( - constraints: const BoxConstraints(minHeight: 30), - child: container, - ), - ), + return Container( + padding: const EdgeInsets.all(8), + constraints: const BoxConstraints(minHeight: 30), + child: container, ); }, ),