Skip to content

Commit

Permalink
Fix tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
arianneorpilla committed May 10, 2023
1 parent 70707c2 commit af4d345
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
8 changes: 6 additions & 2 deletions yuuna/lib/i18n/strings.g.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/// Generated file. Do not edit.
///
/// Locales: 1
/// Strings: 364
/// Strings: 366
///
/// Built on 2023-05-10 at 10:54 UTC
/// Built on 2023-05-10 at 12:48 UTC
// coverage:ignore-file
// ignore_for_file: type=lint
Expand Down Expand Up @@ -509,6 +509,8 @@ class _StringsEn implements BaseTranslations<AppLocale, _StringsEn> {
String get subtitle_timing_hide => 'Hide subtitle timings';
String get find_next => 'Find Next';
String get find_previous => 'Find Previous';
String get shadowing_mode => 'Shadowing Mode';
String get display_settings => 'Display Settings';
late final _StringsRetryingInEn retrying_in = _StringsRetryingInEn._(_root);
late final _StringsViewRepliesEn view_replies = _StringsViewRepliesEn._(_root);
}
Expand Down Expand Up @@ -905,6 +907,8 @@ extension on _StringsEn {
case 'subtitle_timing_hide': return 'Hide subtitle timings';
case 'find_next': return 'Find Next';
case 'find_previous': return 'Find Previous';
case 'shadowing_mode': return 'Shadowing Mode';
case 'display_settings': return 'Display Settings';
case 'retrying_in.seconds': return ({required num n}) => (_root.$meta.cardinalResolver ?? PluralResolvers.cardinal('en'))(n,
one: 'Retrying in ${n} second...',
other: 'Retrying in ${n} seconds...',
Expand Down
2 changes: 2 additions & 0 deletions yuuna/lib/i18n/strings.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,8 @@
"subtitle_timing_hide": "Hide subtitle timings",
"find_next": "Find Next",
"find_previous": "Find Previous",
"shadowing_mode": "Shadowing Mode",
"display_settings": "Display Settings",
"retrying_in": {
"seconds": {
"one": "Retrying in $n second...",
Expand Down
27 changes: 15 additions & 12 deletions yuuna/lib/src/pages/implementations/player_source_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1040,18 +1040,21 @@ class _PlayerSourcePageState extends BaseSourcePageState<PlayerSourcePage>
return Material(
color: Colors.transparent,
child: InkWell(
child: Container(
alignment: Alignment.center,
height: _menuHeight,
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Text(
'${getPositionText()} / ${getDurationText()}',
style: TextStyle(
color: (shadowingSubtitle != null)
? Colors.red
: appModel.isDarkMode
? Colors.white
: Colors.black,
child: Tooltip(
message: t.shadowing_mode,
child: Container(
alignment: Alignment.center,
height: _menuHeight,
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Text(
'${getPositionText()} / ${getDurationText()}',
style: TextStyle(
color: (shadowingSubtitle != null)
? Colors.red
: appModel.isDarkMode
? Colors.white
: Colors.black,
),
),
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class _PlayerTranscriptPageState
return PopupMenuButton<VoidCallback>(
splashRadius: 20,
padding: EdgeInsets.zero,
tooltip: t.switch_profiles,
tooltip: t.display_settings,
icon: Icon(
Icons.display_settings,
color: theme.iconTheme.color,
Expand Down

0 comments on commit af4d345

Please sign in to comment.