From 995afe1412606f4524571229a1917fa7b44c6331 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Sat, 7 Nov 2026 22:40:56 -0500 Subject: [PATCH] clean up audio players --- lib/widgets/players/audio.dart | 41 +++++++++++------------- lib/widgets/players/player_controls.dart | 23 +++++++------ 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lib/widgets/players/audio.dart b/lib/widgets/players/audio.dart index 3e254b0..d38d589 100644 --- a/lib/widgets/players/audio.dart +++ b/lib/widgets/players/audio.dart @@ -36,29 +36,26 @@ class const AudioPlayer( return player.dispose; }, []); - return SizedBox( - height: 60, - child: Card( - color: Theme.of(context).colorScheme.surfaceContainer, - child: Padding( - padding: .symmetric(horizontal: 8), - child: PlayerControls( - player, - loading: !loaded.value, - actions: .new([ - SizedBox(width: 4), - IconButton( - onPressed: () => context.saveAttachment( - ref, - uri, - encrypted: encrypted, - filename: filename, - ), - tooltip: "Download", - icon: Icon(Icons.download), + return Card( + color: Theme.of(context).colorScheme.surfaceContainerHigh, + child: Padding( + padding: .symmetric(horizontal: 8), + child: PlayerControls( + player, + loading: !loaded.value, + actions: .new([ + SizedBox(width: 4), + IconButton( + onPressed: () => context.saveAttachment( + ref, + uri, + encrypted: encrypted, + filename: filename, ), - ]), - ), + tooltip: "Download", + icon: Icon(Icons.download), + ), + ]), ), ), ); diff --git a/lib/widgets/players/player_controls.dart b/lib/widgets/players/player_controls.dart index 6226260..932c79a 100644 --- a/lib/widgets/players/player_controls.dart +++ b/lib/widgets/players/player_controls.dart @@ -77,7 +77,8 @@ class const PlayerControls( ? Column( mainAxisSize: .min, children: [ - slider(padding: const .symmetric(horizontal: 12)), + SizedBox(height: 12), + slider(padding: const .symmetric(horizontal: 16)), Row( children: [ playButton, @@ -94,15 +95,17 @@ class const PlayerControls( ), ], ) - : Row( - children: [ - playButton, - SizedBox(width: 8), - Text(format(position), style: textStyle), - Expanded(child: slider()), - Text(format(duration), style: textStyle), - ...actions, - ], + : IntrinsicHeight( + child: Row( + children: [ + playButton, + SizedBox(width: 8), + Text(format(position), style: textStyle), + Expanded(child: slider()), + Text(format(duration), style: textStyle), + ...actions, + ], + ), ), ); }