High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
feat(mobile): increased tap area on video player overlay (#27269)
Yaros41f285aa3ee8
diff --git a/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dartindex cf7ffbd234..ff09d15496 100644--- a/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart+++ b/mobile/lib/presentation/widgets/asset_viewer/bottom_bar.widget.dart@@ -65,26 +65,37 @@ class ViewerBottomBar extends ConsumerWidget {labelLarge: context.themeData.textTheme.labelLarge?.copyWith(color: Colors.white),),),- child: Container(- decoration: const BoxDecoration(- gradient: LinearGradient(- begin: Alignment.bottomCenter,- end: Alignment.topCenter,- colors: [Colors.black45, Colors.black12, Colors.transparent],- stops: [0.0, 0.7, 1.0],+ child: Stack(+ children: [+ const Positioned.fill(+ child: IgnorePointer(+ child: DecoratedBox(+ decoration: BoxDecoration(+ gradient: LinearGradient(+ begin: Alignment.bottomCenter,+ end: Alignment.topCenter,+ colors: [Colors.black45, Colors.black12, Colors.transparent],+ stops: [0.0, 0.7, 1.0],+ ),+ ),+ ),+ ),),- ),- child: SafeArea(- top: false,- child: Column(- mainAxisSize: MainAxisSize.min,- children: [- if (asset.isVideo) VideoControls(videoPlayerName: asset.heroTag),- if (!isReadonlyModeEnabled)- Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: actions),- ],+ SafeArea(+ top: false,+ child: Padding(+ padding: const EdgeInsets.only(top: 16),+ child: Column(+ mainAxisSize: MainAxisSize.min,+ children: [+ if (asset.isVideo) VideoControls(videoPlayerName: asset.heroTag),+ if (!isReadonlyModeEnabled)+ Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: actions),+ ],+ ),+ ),),- ),+ ],),),);diff --git a/mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dartindex eb00b042a3..42d11a8063 100644--- a/mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dart+++ b/mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dart@@ -75,29 +75,41 @@ class ViewerTopAppBar extends ConsumerWidget implements PreferredSizeWidget {child: AnimatedOpacity(opacity: opacity,duration: Durations.short2,- child: DecoratedBox(- decoration: BoxDecoration(- gradient: showingDetails- ? null- : const LinearGradient(- begin: Alignment.topCenter,- end: Alignment.bottomCenter,- colors: [Colors.black45, Colors.black12, Colors.transparent],- stops: [0.0, 0.7, 1.0],+ child: Stack(+ children: [+ Positioned.fill(+ child: IgnorePointer(+ child: DecoratedBox(+ decoration: BoxDecoration(+ gradient: showingDetails+ ? null+ : const LinearGradient(+ begin: Alignment.topCenter,+ end: Alignment.bottomCenter,+ colors: [Colors.black45, Colors.black12, Colors.transparent],+ stops: [0.0, 0.7, 1.0],+ ),),- ),- child: AppBar(- backgroundColor: Colors.transparent,- leading: const _AppBarBackButton(),- iconTheme: const IconThemeData(size: 22, color: Colors.white),- actionsIconTheme: const IconThemeData(size: 22, color: Colors.white),- shape: const Border(),- actions: showingDetails || isReadonlyModeEnabled- ? null- : isInLockedView- ? lockedViewActions- : actions,- ),+ ),+ ),+ ),+ SafeArea(+ bottom: false,+ child: SizedBox.square(+ child: Theme(+ data: context.themeData.copyWith(iconTheme: const IconThemeData(size: 22, color: Colors.white)),+ child: Row(+ children: [+ const _AppBarBackButton(),+ const Spacer(),+ if (!showingDetails && !isReadonlyModeEnabled)+ if (isInLockedView) ...lockedViewActions else ...actions,+ ],+ ),+ ),+ ),+ ),+ ],),),);@@ -113,20 +125,17 @@ class _AppBarBackButton extends ConsumerWidget {@overrideWidget build(BuildContext context, WidgetRef ref) {final showingDetails = ref.watch(assetViewerProvider.select((state) => state.showingDetails));- return Padding(- padding: const EdgeInsets.only(left: 12.0),- child: ElevatedButton(- style: ElevatedButton.styleFrom(- backgroundColor: showingDetails ? context.colorScheme.surface : Colors.transparent,- shape: const CircleBorder(),- iconSize: 22,- iconColor: showingDetails ? context.colorScheme.onSurface : Colors.white,- padding: EdgeInsets.zero,- elevation: showingDetails ? 4 : 0,- ),- onPressed: context.maybePop,- child: const Icon(Icons.arrow_back_rounded),+ return ElevatedButton(+ style: ElevatedButton.styleFrom(+ backgroundColor: showingDetails ? context.colorScheme.surface : Colors.transparent,+ shape: const CircleBorder(),+ iconSize: 22,+ iconColor: showingDetails ? context.colorScheme.onSurface : Colors.white,+ padding: const EdgeInsets.all(10.0),+ elevation: showingDetails ? 4 : 0,),+ onPressed: context.maybePop,+ child: const Icon(Icons.arrow_back_rounded),);}}diff --git a/mobile/lib/widgets/asset_viewer/video_controls.dart b/mobile/lib/widgets/asset_viewer/video_controls.dartindex 89b0f0ec30..02b2d927b5 100644--- a/mobile/lib/widgets/asset_viewer/video_controls.dart+++ b/mobile/lib/widgets/asset_viewer/video_controls.dart@@ -119,13 +119,15 @@ class _VideoControlsState extends ConsumerState<VideoControls> {onPressed: () => _toggle(isCasting),),const Spacer(),- Text(- "${position.format()} / ${duration.format()}",- style: const TextStyle(- color: Colors.white,- fontWeight: FontWeight.w500,- fontFeatures: [FontFeature.tabularFigures()],- shadows: VideoControls._controlShadows,+ IgnorePointer(+ child: Text(+ "${position.format()} / ${duration.format()}",+ style: const TextStyle(+ color: Colors.white,+ fontWeight: FontWeight.w500,+ fontFeatures: [FontFeature.tabularFigures()],+ shadows: VideoControls._controlShadows,+ ),),),const SizedBox(width: 12),