ui: transparent compact AppBar (64dp → 44dp)
- 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 <noreply@anthropic.com>
This commit is contained in:
parent
ed39518a71
commit
3025910095
|
|
@ -13,8 +13,10 @@ class AppTheme {
|
||||||
),
|
),
|
||||||
scaffoldBackgroundColor: AppColors.background,
|
scaffoldBackgroundColor: AppColors.background,
|
||||||
appBarTheme: const AppBarTheme(
|
appBarTheme: const AppBarTheme(
|
||||||
backgroundColor: AppColors.surface,
|
backgroundColor: Colors.transparent,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
|
scrolledUnderElevation: 0,
|
||||||
|
toolbarHeight: 44,
|
||||||
),
|
),
|
||||||
cardTheme: CardThemeData(
|
cardTheme: CardThemeData(
|
||||||
color: AppColors.surface,
|
color: AppColors.surface,
|
||||||
|
|
@ -66,8 +68,10 @@ class AppTheme {
|
||||||
),
|
),
|
||||||
scaffoldBackgroundColor: const Color(0xFFF1F5F9),
|
scaffoldBackgroundColor: const Color(0xFFF1F5F9),
|
||||||
appBarTheme: const AppBarTheme(
|
appBarTheme: const AppBarTheme(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.transparent,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
|
scrolledUnderElevation: 0,
|
||||||
|
toolbarHeight: 44,
|
||||||
foregroundColor: Color(0xFF1E293B),
|
foregroundColor: Color(0xFF1E293B),
|
||||||
),
|
),
|
||||||
cardTheme: CardThemeData(
|
cardTheme: CardThemeData(
|
||||||
|
|
|
||||||
|
|
@ -476,27 +476,28 @@ class _ChatPageState extends ConsumerState<ChatPage> {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
drawer: const ConversationDrawer(),
|
drawer: const ConversationDrawer(),
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('iAgent'),
|
title: const Text('iAgent', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600)),
|
||||||
actions: [
|
actions: [
|
||||||
// New chat button (always visible)
|
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Icons.edit_outlined),
|
icon: const Icon(Icons.edit_outlined, size: 20),
|
||||||
tooltip: '新对话',
|
tooltip: '新对话',
|
||||||
|
visualDensity: VisualDensity.compact,
|
||||||
onPressed: () => ref.read(chatProvider.notifier).startNewChat(),
|
onPressed: () => ref.read(chatProvider.notifier).startNewChat(),
|
||||||
),
|
),
|
||||||
// Stop button during streaming
|
|
||||||
if (chatState.isStreaming)
|
if (chatState.isStreaming)
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Icons.stop_circle_outlined),
|
icon: const Icon(Icons.stop_circle_outlined, size: 20),
|
||||||
tooltip: '停止',
|
tooltip: '停止',
|
||||||
|
visualDensity: VisualDensity.compact,
|
||||||
onPressed: () => ref.read(chatProvider.notifier).cancelCurrentTask(),
|
onPressed: () => ref.read(chatProvider.notifier).cancelCurrentTask(),
|
||||||
),
|
),
|
||||||
// Voice call button
|
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Icons.call),
|
icon: const Icon(Icons.call, size: 20),
|
||||||
tooltip: '语音通话',
|
tooltip: '语音通话',
|
||||||
|
visualDensity: VisualDensity.compact,
|
||||||
onPressed: _openVoiceCall,
|
onPressed: _openVoiceCall,
|
||||||
),
|
),
|
||||||
|
const SizedBox(width: 4),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue