From 3025910095856e7e8c463d13ba44852a4cc5bd5d Mon Sep 17 00:00:00 2001 From: hailin Date: Sat, 28 Feb 2026 05:20:23 -0800 Subject: [PATCH] =?UTF-8?q?ui:=20transparent=20compact=20AppBar=20(64dp=20?= =?UTF-8?q?=E2=86=92=2044dp)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - AppBar background transparent, merges with scaffold for seamless look - toolbarHeight reduced from 64dp to 44dp (~20dp screen space saved) - scrolledUnderElevation: 0 prevents Material 3 shadow on scroll - Icons 24→20px with VisualDensity.compact for tighter action buttons - Title fontSize 16 w600, less visual weight - Both dark and light themes updated consistently Co-Authored-By: Claude Opus 4.6 --- it0_app/lib/core/theme/app_theme.dart | 8 ++++++-- .../chat/presentation/pages/chat_page.dart | 15 ++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/it0_app/lib/core/theme/app_theme.dart b/it0_app/lib/core/theme/app_theme.dart index 1b0b35b..317d5c9 100644 --- a/it0_app/lib/core/theme/app_theme.dart +++ b/it0_app/lib/core/theme/app_theme.dart @@ -13,8 +13,10 @@ class AppTheme { ), scaffoldBackgroundColor: AppColors.background, appBarTheme: const AppBarTheme( - backgroundColor: AppColors.surface, + backgroundColor: Colors.transparent, elevation: 0, + scrolledUnderElevation: 0, + toolbarHeight: 44, ), cardTheme: CardThemeData( color: AppColors.surface, @@ -66,8 +68,10 @@ class AppTheme { ), scaffoldBackgroundColor: const Color(0xFFF1F5F9), appBarTheme: const AppBarTheme( - backgroundColor: Colors.white, + backgroundColor: Colors.transparent, elevation: 0, + scrolledUnderElevation: 0, + toolbarHeight: 44, foregroundColor: Color(0xFF1E293B), ), cardTheme: CardThemeData( diff --git a/it0_app/lib/features/chat/presentation/pages/chat_page.dart b/it0_app/lib/features/chat/presentation/pages/chat_page.dart index d4db696..1186d16 100644 --- a/it0_app/lib/features/chat/presentation/pages/chat_page.dart +++ b/it0_app/lib/features/chat/presentation/pages/chat_page.dart @@ -476,27 +476,28 @@ class _ChatPageState extends ConsumerState { return Scaffold( drawer: const ConversationDrawer(), appBar: AppBar( - title: const Text('iAgent'), + title: const Text('iAgent', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600)), actions: [ - // New chat button (always visible) IconButton( - icon: const Icon(Icons.edit_outlined), + icon: const Icon(Icons.edit_outlined, size: 20), tooltip: '新对话', + visualDensity: VisualDensity.compact, onPressed: () => ref.read(chatProvider.notifier).startNewChat(), ), - // Stop button during streaming if (chatState.isStreaming) IconButton( - icon: const Icon(Icons.stop_circle_outlined), + icon: const Icon(Icons.stop_circle_outlined, size: 20), tooltip: '停止', + visualDensity: VisualDensity.compact, onPressed: () => ref.read(chatProvider.notifier).cancelCurrentTask(), ), - // Voice call button IconButton( - icon: const Icon(Icons.call), + icon: const Icon(Icons.call, size: 20), tooltip: '语音通话', + visualDensity: VisualDensity.compact, onPressed: _openVoiceCall, ), + const SizedBox(width: 4), ], ), body: SafeArea(