Fix missing tooltip for the mute button

This commit is contained in:
Ming Ming 2021-09-02 22:20:04 +08:00
parent 25523b72ab
commit b085f8f4e1
3 changed files with 30 additions and 14 deletions

View file

@ -758,6 +758,8 @@
"@unsetAlbumCoverFailureNotification": {
"description": "Cannot unset the cover of the opened album"
},
"muteTooltip": "Mute",
"unmuteTooltip": "Unmute",
"errorUnauthenticated": "Unauthenticated access. Please sign-in again if the problem continues",
"@errorUnauthenticated": {

View file

@ -44,7 +44,9 @@
"unsetAlbumCoverTooltip",
"unsetAlbumCoverProcessingNotification",
"unsetAlbumCoverSuccessNotification",
"unsetAlbumCoverFailureNotification"
"unsetAlbumCoverFailureNotification",
"muteTooltip",
"unmuteTooltip"
],
"es": [
@ -62,7 +64,9 @@
"unsetAlbumCoverTooltip",
"unsetAlbumCoverProcessingNotification",
"unsetAlbumCoverSuccessNotification",
"unsetAlbumCoverFailureNotification"
"unsetAlbumCoverFailureNotification",
"muteTooltip",
"unmuteTooltip"
],
"fr": [
@ -90,7 +94,9 @@
"unsetAlbumCoverTooltip",
"unsetAlbumCoverProcessingNotification",
"unsetAlbumCoverSuccessNotification",
"unsetAlbumCoverFailureNotification"
"unsetAlbumCoverFailureNotification",
"muteTooltip",
"unmuteTooltip"
],
"ru": [
@ -118,6 +124,8 @@
"unsetAlbumCoverTooltip",
"unsetAlbumCoverProcessingNotification",
"unsetAlbumCoverSuccessNotification",
"unsetAlbumCoverFailureNotification"
"unsetAlbumCoverFailureNotification",
"muteTooltip",
"unmuteTooltip"
]
}

View file

@ -4,6 +4,7 @@ import 'package:logging/logging.dart';
import 'package:nc_photos/account.dart';
import 'package:nc_photos/api/api.dart';
import 'package:nc_photos/api/api_util.dart' as api_util;
import 'package:nc_photos/app_localizations.dart';
import 'package:nc_photos/entity/file.dart';
import 'package:nc_photos/exception_util.dart' as exception_util;
import 'package:nc_photos/k.dart' as k;
@ -200,16 +201,21 @@ class _VideoViewerState extends State<VideoViewer> {
),
),
const SizedBox(width: 4),
InkWell(
borderRadius: BorderRadius.all(Radius.circular(32)),
onTap: _onVolumnPressed,
child: Padding(
padding: const EdgeInsets.all(4),
child: Icon(
_controller.value.volume == 0
? Icons.volume_mute_outlined
: Icons.volume_up_outlined,
color: AppTheme.getSecondaryTextColor(context),
Tooltip(
message: _controller.value.volume == 0
? L10n.global().unmuteTooltip
: L10n.global().muteTooltip,
child: InkWell(
borderRadius: BorderRadius.all(Radius.circular(32)),
onTap: _onVolumnPressed,
child: Padding(
padding: const EdgeInsets.all(4),
child: Icon(
_controller.value.volume == 0
? Icons.volume_mute_outlined
: Icons.volume_up_outlined,
color: AppTheme.getSecondaryTextColor(context),
),
),
),
),