From 1c57d59d73a74c75d4c6ff52bdf307227819ad69 Mon Sep 17 00:00:00 2001 From: lxh2875931338 Date: Sat, 31 Oct 2026 23:17:01 +0800 Subject: [PATCH] =?UTF-8?q?style(ui):=20=E6=92=AD=E6=94=BE=E9=A1=B5?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E4=B8=8B=E7=A7=BB=20+=20=E6=94=B6=E8=97=8F?= =?UTF-8?q?=E7=A7=BB=E5=88=B0=E6=A0=87=E9=A2=98=E5=8F=B3=E4=BE=A7=20+=20?= =?UTF-8?q?=E5=BA=95=E9=83=A8=E6=94=B9=E6=92=AD=E6=94=BE=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 按草图调整: - 主播放页顶部留 16px,封面与指示器拉开距离 - 收藏心从底部控制行移到标题右侧(空心/实心红随收藏状态) - 底部控制行第四位改为播放模式按钮(循环图标),队列保持在第五位 --- lib/pages/player_page.dart | 56 +++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 19 deletions(-) diff --git a/lib/pages/player_page.dart b/lib/pages/player_page.dart index 2bb97f9..38b1bff 100644 --- a/lib/pages/player_page.dart +++ b/lib/pages/player_page.dart @@ -307,7 +307,8 @@ class _PlayerPageState extends BaseState { Widget _buildMainPage(AudioService service, Song song, bool isPlaying) { return Padding( - padding: const EdgeInsets.symmetric(horizontal: 24), + // 顶部留 16:与 AppBar/指示器拉开距离,避免封面贴着顶部 + padding: const EdgeInsets.fromLTRB(24, 16, 24, 0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -334,19 +335,38 @@ class _PlayerPageState extends BaseState { ), const SizedBox(height: 28), - // ---- 标题 / 艺术家 ---- - Text( - song.title, - style: const TextStyle( - fontSize: 24, - fontWeight: FontWeight.w600, - color: Colors.white, - height: 1.25, - ), - maxLines: 2, - overflow: TextOverflow.ellipsis, + // ---- 标题 / 艺术家(收藏心在标题右侧)---- + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Text( + song.title, + style: const TextStyle( + fontSize: 24, + fontWeight: FontWeight.w600, + color: Colors.white, + height: 1.25, + ), + maxLines: 2, + overflow: TextOverflow.ellipsis, + ), + ), + const SizedBox(width: 8), + IconButton( + onPressed: () => _toggleFavorite(song), + tooltip: '收藏', + icon: Icon( + _isFavorite ? Icons.favorite : Icons.favorite_border, + color: _isFavorite + ? const Color(0xFFE05C5C) + : Colors.white54, + size: 26, + ), + ), + ], ), - const SizedBox(height: 6), + const SizedBox(height: 2), Text( song.artist, style: TextStyle(fontSize: 14, color: Colors.grey[400]), @@ -641,15 +661,13 @@ class _PlayerPageState extends BaseState { color: service.hasQueue ? Colors.white70 : Colors.grey[700], ), IconButton( - onPressed: () => _toggleFavorite(song), + onPressed: service.togglePlayMode, icon: Icon( - _isFavorite ? Icons.favorite : Icons.favorite_border, - color: _isFavorite - ? const Color(0xFFE05C5C) - : Colors.white54, + service.playModeIcon, + color: const Color(0xFFB8D4D0), size: 26, ), - tooltip: '收藏', + tooltip: '播放模式', ), IconButton( onPressed: _openPlaylist,