mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
fix: lyrics page text contrast
This commit is contained in:
parent
8d4602962b
commit
179d536ccc
@ -1,9 +1,8 @@
|
|||||||
import 'package:flutter/gestures.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:palette_generator/palette_generator.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/collections/spotube_icons.dart';
|
||||||
import 'package:spotube/components/lyrics/zoom_controls.dart';
|
import 'package:spotube/components/lyrics/zoom_controls.dart';
|
||||||
import 'package:spotube/components/shared/shimmers/shimmer_lyrics.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/services/queries/queries.dart';
|
||||||
|
|
||||||
import 'package:spotube/utils/type_conversion_utils.dart';
|
import 'package:spotube/utils/type_conversion_utils.dart';
|
||||||
|
import 'package:stroke_text/stroke_text.dart';
|
||||||
|
|
||||||
final _delay = StateProvider<int>((ref) => 0);
|
final _delay = StateProvider<int>((ref) => 0);
|
||||||
|
|
||||||
@ -130,15 +130,13 @@ class SyncedLyrics extends HookConsumerWidget {
|
|||||||
child: AnimatedDefaultTextStyle(
|
child: AnimatedDefaultTextStyle(
|
||||||
duration: const Duration(milliseconds: 250),
|
duration: const Duration(milliseconds: 250),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: isActive
|
|
||||||
? Colors.white
|
|
||||||
: palette.bodyTextColor,
|
|
||||||
fontWeight: isActive
|
fontWeight: isActive
|
||||||
? FontWeight.w500
|
? FontWeight.w500
|
||||||
: FontWeight.normal,
|
: FontWeight.normal,
|
||||||
fontSize: (isActive ? 28 : 26) *
|
fontSize: (isActive ? 28 : 26) *
|
||||||
(textZoomLevel.value / 100),
|
(textZoomLevel.value / 100),
|
||||||
),
|
),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final duration =
|
final duration =
|
||||||
@ -153,10 +151,19 @@ class SyncedLyrics extends HookConsumerWidget {
|
|||||||
}
|
}
|
||||||
audioPlayer.seek(time);
|
audioPlayer.seek(time);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Builder(builder: (context) {
|
||||||
lyricSlice.text,
|
return StrokeText(
|
||||||
textAlign: TextAlign.center,
|
text: lyricSlice.text,
|
||||||
),
|
textStyle:
|
||||||
|
DefaultTextStyle.of(context).style,
|
||||||
|
textColor: isActive
|
||||||
|
? Colors.white
|
||||||
|
: palette.bodyTextColor,
|
||||||
|
strokeColor: isActive
|
||||||
|
? Colors.black
|
||||||
|
: Colors.transparent,
|
||||||
|
);
|
||||||
|
}),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -337,14 +337,16 @@ class SettingsPage extends HookConsumerWidget {
|
|||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: context
|
text: context
|
||||||
.l10n.piped_description),
|
.l10n.piped_description,
|
||||||
|
style:
|
||||||
|
theme.textTheme.bodyMedium,
|
||||||
|
),
|
||||||
const TextSpan(text: "\n"),
|
const TextSpan(text: "\n"),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text:
|
text:
|
||||||
context.l10n.piped_warning,
|
context.l10n.piped_warning,
|
||||||
style: Theme.of(context)
|
style:
|
||||||
.textTheme
|
theme.textTheme.labelMedium,
|
||||||
.labelMedium,
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -1715,6 +1715,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
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:
|
supabase:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -103,6 +103,7 @@ dependencies:
|
|||||||
ref: a738913c8ce2c9f47515382d40827e794a334274
|
ref: a738913c8ce2c9f47515382d40827e794a334274
|
||||||
path: plugins/window_size
|
path: plugins/window_size
|
||||||
youtube_explode_dart: ^2.0.1
|
youtube_explode_dart: ^2.0.1
|
||||||
|
stroke_text: ^0.0.2
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
build_runner: ^2.3.2
|
build_runner: ^2.3.2
|
||||||
|
Loading…
Reference in New Issue
Block a user