Browse Source

fix: text overflow on time in event card (#2434)

Richard Shiue 2 years ago
parent
commit
95bc325e85

+ 16 - 9
frontend/appflowy_flutter/lib/plugins/database_view/calendar/presentation/calendar_day.dart

@@ -122,17 +122,24 @@ class CalendarDayCard extends StatelessWidget {
         child: Padding(
         child: Padding(
           padding: const EdgeInsets.symmetric(vertical: 2),
           padding: const EdgeInsets.symmetric(vertical: 2),
           child: Row(
           child: Row(
+            mainAxisAlignment: MainAxisAlignment.spaceBetween,
             children: [
             children: [
-              FlowyText.regular(
-                cellData.date,
-                fontSize: 10,
-                color: Theme.of(context).hintColor,
+              Flexible(
+                flex: 3,
+                child: FlowyText.regular(
+                  cellData.date,
+                  fontSize: 10,
+                  color: Theme.of(context).hintColor,
+                  overflow: TextOverflow.ellipsis,
+                ),
               ),
               ),
-              const Spacer(),
-              FlowyText.regular(
-                cellData.time,
-                fontSize: 10,
-                color: Theme.of(context).hintColor,
+              Flexible(
+                child: FlowyText.regular(
+                  cellData.time,
+                  fontSize: 10,
+                  color: Theme.of(context).hintColor,
+                  overflow: TextOverflow.ellipsis,
+                ),
               )
               )
             ],
             ],
           ),
           ),