From ceb51afd03d62a901996d4d50e9f70a10ce77928 Mon Sep 17 00:00:00 2001 From: DelLevin-Home Date: Mon, 10 Aug 2026 20:57:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=AC=94=E8=AE=B0=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/note/note_tab_page.dart | 14 ++++++++++++-- lib/widgets/note_list_item.dart | 9 +++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/lib/pages/note/note_tab_page.dart b/lib/pages/note/note_tab_page.dart index fd299d4..3ac4ba0 100644 --- a/lib/pages/note/note_tab_page.dart +++ b/lib/pages/note/note_tab_page.dart @@ -218,6 +218,11 @@ class _NoteTabPageState extends State { Widget _buildTimelineItem(Note note) { final colors = Theme.of(context).colorScheme; + final isDark = Theme.of(context).brightness == Brightness.dark; + final cardColor = Color.alphaBlend( + colors.onSurface.withValues(alpha: isDark ? 0.04 : 0.022), + colors.surface, + ); return GestureDetector( onTap: () => _onNoteTap(note), onLongPress: () => _showNoteActions(note), @@ -228,7 +233,7 @@ class _NoteTabPageState extends State { Expanded(child: Container(width: 1, color: colors.outline)), ])), Expanded(child: Container(margin: const EdgeInsets.only(bottom: 16), padding: const EdgeInsets.all(14), - decoration: BoxDecoration(color: colors.surfaceContainerHigh, borderRadius: BorderRadius.circular(12)), + decoration: BoxDecoration(color: cardColor, borderRadius: BorderRadius.circular(8)), child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ Row(children: [ Expanded(child: Text(_formatFullDate(note.updatedAt), style: TextStyle(fontSize: 11, color: colors.onSurface.withValues(alpha: 0.4)))), @@ -276,6 +281,11 @@ class _NoteTabPageState extends State { Widget _buildWaterfallCard(Note note) { final colors = Theme.of(context).colorScheme; + final isDark = Theme.of(context).brightness == Brightness.dark; + final cardColor = Color.alphaBlend( + colors.onSurface.withValues(alpha: isDark ? 0.04 : 0.022), + colors.surface, + ); final contentText = _getPreviewText(note); final images = note.images; final hasImage = images.isNotEmpty; @@ -284,7 +294,7 @@ class _NoteTabPageState extends State { onTap: () => _onNoteTap(note), onLongPress: () => _showNoteActions(note), child: Container(margin: const EdgeInsets.only(bottom: 8), - decoration: BoxDecoration(color: colors.surface, borderRadius: BorderRadius.circular(10), + decoration: BoxDecoration(color: cardColor, borderRadius: BorderRadius.circular(8), boxShadow: [BoxShadow(color: Colors.black.withValues(alpha: 0.04), blurRadius: 6, offset: const Offset(0, 2))]), clipBehavior: Clip.antiAlias, child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ diff --git a/lib/widgets/note_list_item.dart b/lib/widgets/note_list_item.dart index c56d3c2..5e55d7a 100644 --- a/lib/widgets/note_list_item.dart +++ b/lib/widgets/note_list_item.dart @@ -30,6 +30,11 @@ class _NoteListItemContent extends StatelessWidget { @override Widget build(BuildContext context) { final colors = Theme.of(context).colorScheme; + final isDark = Theme.of(context).brightness == Brightness.dark; + final cardColor = Color.alphaBlend( + colors.onSurface.withValues(alpha: isDark ? 0.04 : 0.022), + colors.surface, + ); final previewText = _getPreviewText(note); return GestureDetector( @@ -43,8 +48,8 @@ class _NoteListItemContent extends StatelessWidget { margin: const EdgeInsets.only(bottom: 6), padding: const EdgeInsets.all(12), decoration: BoxDecoration( - color: colors.surfaceContainerHigh, - borderRadius: BorderRadius.circular(10), + color: cardColor, + borderRadius: BorderRadius.circular(8), border: selected ? Border.all(color: colors.primary, width: 1.5) : null, ), child: Column(