diff --git a/lib/pages/lyrics/synced_lyrics.dart b/lib/pages/lyrics/synced_lyrics.dart index 9a3d2ac52..dab2103dd 100644 --- a/lib/pages/lyrics/synced_lyrics.dart +++ b/lib/pages/lyrics/synced_lyrics.dart @@ -1,9 +1,8 @@ -import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:palette_generator/palette_generator.dart'; -import 'package:spotify/spotify.dart'; +import 'package:spotify/spotify.dart' hide Offset; import 'package:spotube/collections/spotube_icons.dart'; import 'package:spotube/components/lyrics/zoom_controls.dart'; import 'package:spotube/components/shared/shimmers/shimmer_lyrics.dart'; @@ -16,6 +15,7 @@ import 'package:spotube/services/audio_player/audio_player.dart'; import 'package:spotube/services/queries/queries.dart'; import 'package:spotube/utils/type_conversion_utils.dart'; +import 'package:stroke_text/stroke_text.dart'; final _delay = StateProvider((ref) => 0); @@ -130,15 +130,13 @@ class SyncedLyrics extends HookConsumerWidget { child: AnimatedDefaultTextStyle( duration: const Duration(milliseconds: 250), style: TextStyle( - color: isActive - ? Colors.white - : palette.bodyTextColor, fontWeight: isActive ? FontWeight.w500 : FontWeight.normal, fontSize: (isActive ? 28 : 26) * (textZoomLevel.value / 100), ), + textAlign: TextAlign.center, child: InkWell( onTap: () async { final duration = @@ -153,10 +151,19 @@ class SyncedLyrics extends HookConsumerWidget { } audioPlayer.seek(time); }, - child: Text( - lyricSlice.text, - textAlign: TextAlign.center, - ), + child: Builder(builder: (context) { + return StrokeText( + text: lyricSlice.text, + textStyle: + DefaultTextStyle.of(context).style, + textColor: isActive + ? Colors.white + : palette.bodyTextColor, + strokeColor: isActive + ? Colors.black + : Colors.transparent, + ); + }), ), ), ), diff --git a/lib/pages/settings/settings.dart b/lib/pages/settings/settings.dart index 4e3fa92c4..d4e1e9dbb 100644 --- a/lib/pages/settings/settings.dart +++ b/lib/pages/settings/settings.dart @@ -336,15 +336,17 @@ class SettingsPage extends HookConsumerWidget { text: TextSpan( children: [ TextSpan( - text: context - .l10n.piped_description), + text: context + .l10n.piped_description, + style: + theme.textTheme.bodyMedium, + ), const TextSpan(text: "\n"), TextSpan( text: context.l10n.piped_warning, - style: Theme.of(context) - .textTheme - .labelMedium, + style: + theme.textTheme.labelMedium, ) ], ), diff --git a/pubspec.lock b/pubspec.lock index 56f52e9e3..9c264ee2a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1715,6 +1715,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + stroke_text: + dependency: "direct main" + description: + name: stroke_text + sha256: "0ec0e526c0eae7d21ce628d78eb9ae9be634259f26b0f1735f9ed540890d8cf6" + url: "https://pub.dev" + source: hosted + version: "0.0.2" supabase: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 52d2923c0..a26f3676c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -103,6 +103,7 @@ dependencies: ref: a738913c8ce2c9f47515382d40827e794a334274 path: plugins/window_size youtube_explode_dart: ^2.0.1 + stroke_text: ^0.0.2 dev_dependencies: build_runner: ^2.3.2