diff --git a/lib/theme/icons.dart b/lib/theme/icons.dart index 8ec3e3230..f947b079a 100644 --- a/lib/theme/icons.dart +++ b/lib/theme/icons.dart @@ -120,7 +120,8 @@ class AIcons { static final move = MdiIcons.fileMoveOutline; static const rename = Icons.abc_outlined; static const openOutside = Icons.open_in_new_outlined; - static final openVideo = MdiIcons.moviePlayOutline; + static final openVideoPlayer = MdiIcons.openInApp; + static final openVideoPart = MdiIcons.moviePlayOutline; static const pin = Icons.push_pin_outlined; static final unpin = MdiIcons.pinOffOutline; static const print = Icons.print_outlined; diff --git a/lib/view/src/actions/entry.dart b/lib/view/src/actions/entry.dart index 943b7bf60..edf094590 100644 --- a/lib/view/src/actions/entry.dart +++ b/lib/view/src/actions/entry.dart @@ -48,7 +48,7 @@ extension ExtraEntryActionView on EntryAction { // external EntryAction.edit => l10n.entryActionEdit, EntryAction.open => l10n.entryActionOpen, - EntryAction.openVideo => l10n.videoControlsPlayOutside, + EntryAction.openVideoPlayer => l10n.videoControlsPlayOutside, EntryAction.openMap => l10n.entryActionOpenMap, EntryAction.setAs => l10n.entryActionSetAs, EntryAction.cast => l10n.entryActionCast, @@ -125,7 +125,8 @@ extension ExtraEntryActionView on EntryAction { EntryAction.videoShowNextFrame => AIcons.nextFrame, // external EntryAction.edit => AIcons.edit, - EntryAction.open || EntryAction.openVideo => AIcons.openOutside, + EntryAction.open => AIcons.openOutside, + EntryAction.openVideoPlayer => AIcons.openVideoPlayer, EntryAction.openMap => AIcons.map, EntryAction.setAs => AIcons.setAs, EntryAction.cast => AIcons.cast, @@ -143,7 +144,7 @@ extension ExtraEntryActionView on EntryAction { EntryAction.showGeoTiffOnMap => AIcons.map, // metadata / motion photo EntryAction.convertMotionPhotoToStillImage => AIcons.convertToStillImage, - EntryAction.viewMotionPhotoVideo => AIcons.openVideo, + EntryAction.viewMotionPhotoVideo => AIcons.openVideoPart, // debug EntryAction.debug => AIcons.debug, }; diff --git a/lib/widgets/settings/video/control_actions.dart b/lib/widgets/settings/video/control_actions.dart index 1783bf377..4a4ccf485 100644 --- a/lib/widgets/settings/video/control_actions.dart +++ b/lib/widgets/settings/video/control_actions.dart @@ -17,7 +17,7 @@ class VideoControlButtonsPage extends StatefulWidget { class _VideoControlButtonsPageState extends State { late final Set _selectedActions; - static const _availableActions = [...EntryActions.videoPlayback, EntryAction.openVideo]; + static const _availableActions = [...EntryActions.videoPlayback, EntryAction.openVideoPlayer]; @override void initState() { diff --git a/lib/widgets/viewer/action/entry_action_delegate.dart b/lib/widgets/viewer/action/entry_action_delegate.dart index e59c7c90c..a53ae8dd0 100644 --- a/lib/widgets/viewer/action/entry_action_delegate.dart +++ b/lib/widgets/viewer/action/entry_action_delegate.dart @@ -104,7 +104,7 @@ class EntryActionDelegate with FeedbackMixin, PermissionAwareMixin, SizeAwareMix case EntryAction.videoSkip10: case EntryAction.videoShowPreviousFrame: case EntryAction.videoShowNextFrame: - case EntryAction.openVideo: + case EntryAction.openVideoPlayer: return targetEntry.isPureVideo; case EntryAction.rotateScreen: return !settings.useTvLayout && settings.isRotationLocked; @@ -246,7 +246,7 @@ class EntryActionDelegate with FeedbackMixin, PermissionAwareMixin, SizeAwareMix case EntryAction.videoSkip10: case EntryAction.videoShowPreviousFrame: case EntryAction.videoShowNextFrame: - case EntryAction.openVideo: + case EntryAction.openVideoPlayer: final controller = context.read().getController(targetEntry); if (controller != null) { VideoActionNotification( diff --git a/lib/widgets/viewer/action/video_action_delegate.dart b/lib/widgets/viewer/action/video_action_delegate.dart index 6d6c7486d..78375aad4 100644 --- a/lib/widgets/viewer/action/video_action_delegate.dart +++ b/lib/widgets/viewer/action/video_action_delegate.dart @@ -79,7 +79,7 @@ class VideoActionDelegate with FeedbackMixin, PermissionAwareMixin, SizeAwareMix await controller.skipFrames(-1); case EntryAction.videoShowNextFrame: await controller.skipFrames(1); - case EntryAction.openVideo: + case EntryAction.openVideoPlayer: await appService.open(entry.uri, entry.mimeTypeAnySubtype, forceChooser: false).then((success) { if (!success) showNoMatchingAppDialog(context); }); diff --git a/lib/widgets/viewer/overlay/video/controls.dart b/lib/widgets/viewer/overlay/video/controls.dart index b538ca0c0..7cd0624c1 100644 --- a/lib/widgets/viewer/overlay/video/controls.dart +++ b/lib/widgets/viewer/overlay/video/controls.dart @@ -39,7 +39,7 @@ class VideoControlRow extends StatelessWidget { final action = actions.first; return Padding( padding: const EdgeInsets.only(left: padding), - child: _buildOverlayButton(context, action), + child: _buildOverlayButton(context, action, const BorderRadius.all(radius)), ); } @@ -49,13 +49,13 @@ class VideoControlRow extends StatelessWidget { mainAxisSize: MainAxisSize.min, textDirection: ViewerBottomOverlay.actionsDirection, children: actions.map((action) { - var borderRadius = const BorderRadius.all(Radius.zero); + var borderRadius = BorderRadius.zero; if (action == actions.first) { - borderRadius = const BorderRadius.only(topLeft: radius, bottomLeft: radius); + borderRadius = const BorderRadius.horizontal(left: radius); } else if (action == actions.last) { - borderRadius = const BorderRadius.only(topRight: radius, bottomRight: radius); + borderRadius = const BorderRadius.horizontal(right: radius); } - return _buildOverlayButton(context, action, borderRadius: borderRadius); + return _buildOverlayButton(context, action, borderRadius); }).toList(), ), ); @@ -65,9 +65,9 @@ class VideoControlRow extends StatelessWidget { Widget _buildOverlayButton( BuildContext context, - EntryAction action, { - BorderRadius? borderRadius, - }) { + EntryAction action, + BorderRadius borderRadius, + ) { Widget child; if (action == EntryAction.videoTogglePlay) { child = PlayToggler( @@ -75,7 +75,7 @@ class VideoControlRow extends StatelessWidget { onPressed: () => onActionSelected(action), ); } else { - final enabled = action == EntryAction.openVideo ? !entry.trashed : true; + final enabled = action == EntryAction.openVideoPlayer ? !entry.trashed : true; child = IconButton( icon: action.getIcon(), onPressed: enabled ? () => onActionSelected(action) : null, @@ -83,6 +83,14 @@ class VideoControlRow extends StatelessWidget { ); } + child = Padding( + padding: EdgeInsets.only( + left: borderRadius.topLeft.x > 0 ? padding / 3 : 0, + right: borderRadius.topRight.x > 0 ? padding / 3 : 0, + ), + child: child, + ); + return OverlayButton( scale: scale, borderRadius: borderRadius, diff --git a/lib/widgets/viewer/overlay/video/video.dart b/lib/widgets/viewer/overlay/video/video.dart index eb38e103a..8aaf5cd96 100644 --- a/lib/widgets/viewer/overlay/video/video.dart +++ b/lib/widgets/viewer/overlay/video/video.dart @@ -47,7 +47,7 @@ class _VideoControlOverlayState extends State with SingleTi final status = controller?.status ?? VideoStatus.idle; if (status == VideoStatus.error) { - const action = EntryAction.openVideo; + const action = EntryAction.openVideoPlayer; return Align( alignment: Alignment.centerRight, child: OverlayButton( diff --git a/plugins/aves_model/lib/src/actions/entry.dart b/plugins/aves_model/lib/src/actions/entry.dart index eef9c19a9..a46f30076 100644 --- a/plugins/aves_model/lib/src/actions/entry.dart +++ b/plugins/aves_model/lib/src/actions/entry.dart @@ -33,7 +33,7 @@ enum EntryAction { // external edit, open, - openVideo, + openVideoPlayer, openMap, setAs, cast,