From c9e836bbebb863ceef752b1db3355b481a17766c Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 13 Nov 2024 08:55:54 -0600 Subject: [PATCH 1/2] fix(mobile): duration ui overflow --- mobile/lib/widgets/asset_viewer/video_position.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile/lib/widgets/asset_viewer/video_position.dart b/mobile/lib/widgets/asset_viewer/video_position.dart index 0512785782e18..bdcc9fc1387a3 100644 --- a/mobile/lib/widgets/asset_viewer/video_position.dart +++ b/mobile/lib/widgets/asset_viewer/video_position.dart @@ -22,7 +22,7 @@ class VideoPosition extends HookConsumerWidget { ? const _VideoPositionPlaceholder() : Row( children: [ - FormattedDuration(position), + SizedBox(width: 60, child: FormattedDuration(position)), Expanded( child: Slider( value: min( @@ -50,7 +50,7 @@ class VideoPosition extends HookConsumerWidget { }, ), ), - FormattedDuration(duration), + SizedBox(width: 60, child: FormattedDuration(duration)), const VideoMuteButton(), ], ); From 7edd4f4892617907884ee1b768f7de7ccbd0f739 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 13 Nov 2024 09:21:14 -0600 Subject: [PATCH 2/2] pr feedback --- mobile/lib/widgets/asset_viewer/formatted_duration.dart | 2 +- mobile/lib/widgets/asset_viewer/video_position.dart | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mobile/lib/widgets/asset_viewer/formatted_duration.dart b/mobile/lib/widgets/asset_viewer/formatted_duration.dart index bf64a0c0024f3..4a334cd7ccbb9 100644 --- a/mobile/lib/widgets/asset_viewer/formatted_duration.dart +++ b/mobile/lib/widgets/asset_viewer/formatted_duration.dart @@ -19,7 +19,7 @@ class FormattedDuration extends StatelessWidget { @override Widget build(BuildContext context) { return SizedBox( - width: data.inHours > 0 ? 64 : 43, // use a fixed width to prevent jitter + width: data.inHours > 0 ? 70 : 60, // use a fixed width to prevent jitter child: Text( _formatDuration(data), style: const TextStyle( diff --git a/mobile/lib/widgets/asset_viewer/video_position.dart b/mobile/lib/widgets/asset_viewer/video_position.dart index bdcc9fc1387a3..0512785782e18 100644 --- a/mobile/lib/widgets/asset_viewer/video_position.dart +++ b/mobile/lib/widgets/asset_viewer/video_position.dart @@ -22,7 +22,7 @@ class VideoPosition extends HookConsumerWidget { ? const _VideoPositionPlaceholder() : Row( children: [ - SizedBox(width: 60, child: FormattedDuration(position)), + FormattedDuration(position), Expanded( child: Slider( value: min( @@ -50,7 +50,7 @@ class VideoPosition extends HookConsumerWidget { }, ), ), - SizedBox(width: 60, child: FormattedDuration(duration)), + FormattedDuration(duration), const VideoMuteButton(), ], );