mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 15:35:17 +00:00
fix(macos): black text in dark mode
This commit is contained in:
parent
c201624f99
commit
fb9c0e44be
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@ -5,7 +5,7 @@
|
||||
"name": "Flutter",
|
||||
"type": "dart",
|
||||
"request": "launch",
|
||||
"program": "lib/main.dart"
|
||||
"program": "${workspaceFolder}/lib/main.dart"
|
||||
},
|
||||
],
|
||||
"compounds": []
|
||||
|
@ -25,6 +25,7 @@ class UserAlbums extends HookConsumerWidget {
|
||||
return SingleChildScrollView(
|
||||
child: Material(
|
||||
type: MaterialType.transparency,
|
||||
textStyle: PlatformTheme.of(context).textTheme!.body!,
|
||||
color: PlatformTheme.of(context).scaffoldBackgroundColor,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
|
@ -31,6 +31,7 @@ class UserArtists extends HookConsumerWidget {
|
||||
|
||||
return Material(
|
||||
type: MaterialType.transparency,
|
||||
textStyle: PlatformTheme.of(context).textTheme!.body!,
|
||||
color: PlatformTheme.of(context).scaffoldBackgroundColor,
|
||||
child: GridView.builder(
|
||||
itemCount: artists.length,
|
||||
|
@ -1,6 +1,7 @@
|
||||
import 'package:fl_query_hooks/fl_query_hooks.dart';
|
||||
import 'package:flutter/material.dart' hide Image;
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:platform_ui/platform_ui.dart';
|
||||
import 'package:spotify/spotify.dart';
|
||||
import 'package:spotube/components/LoaderShimmers/ShimmerPlaybuttonCard.dart';
|
||||
import 'package:spotube/components/Playlist/PlaylistCard.dart';
|
||||
@ -36,6 +37,7 @@ class UserPlaylists extends HookConsumerWidget {
|
||||
return SingleChildScrollView(
|
||||
child: Material(
|
||||
type: MaterialType.transparency,
|
||||
textStyle: PlatformTheme.of(context).textTheme!.body!,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
|
@ -49,13 +49,10 @@ class LyricDelayAdjustDialog extends HookConsumerWidget {
|
||||
},
|
||||
),
|
||||
Flexible(
|
||||
child: TextField(
|
||||
child: PlatformTextField(
|
||||
keyboardType: TextInputType.number,
|
||||
controller: controller,
|
||||
decoration: const InputDecoration(
|
||||
isDense: true,
|
||||
hintText: "Delay in milliseconds",
|
||||
),
|
||||
placeholder: "Delay in milliseconds",
|
||||
onSubmitted: (_) {
|
||||
Navigator.of(context).pop(
|
||||
Duration(
|
||||
|
@ -74,6 +74,7 @@ class SyncedLyrics extends HookConsumerWidget {
|
||||
height: breakpoint >= Breakpoints.md ? 50 : 30,
|
||||
child: Material(
|
||||
type: MaterialType.transparency,
|
||||
textStyle: PlatformTheme.of(context).textTheme!.body!,
|
||||
child: Stack(
|
||||
children: [
|
||||
Center(
|
||||
|
@ -90,6 +90,7 @@ class Player extends HookConsumerWidget {
|
||||
),
|
||||
child: Material(
|
||||
type: MaterialType.transparency,
|
||||
textStyle: PlatformTheme.of(context).textTheme!.body!,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
|
@ -62,6 +62,7 @@ class PlayerOverlay extends HookConsumerWidget {
|
||||
duration: const Duration(milliseconds: 250),
|
||||
opacity: canShow ? 1 : 0,
|
||||
child: Material(
|
||||
textStyle: PlatformTheme.of(context).textTheme!.body!,
|
||||
type: MaterialType.transparency,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
|
@ -69,6 +69,7 @@ class PlayerView extends HookConsumerWidget {
|
||||
child: BackdropFilter(
|
||||
filter: ImageFilter.blur(sigmaX: 15, sigmaY: 15),
|
||||
child: Material(
|
||||
textStyle: PlatformTheme.of(context).textTheme!.body!,
|
||||
color: paletteColor.color.withOpacity(.5),
|
||||
child: SafeArea(
|
||||
child: Column(
|
||||
|
@ -3,6 +3,7 @@ import 'dart:ui';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:platform_ui/platform_ui.dart';
|
||||
import 'package:spotube/components/Shared/UniversalImage.dart';
|
||||
import 'package:spotube/provider/Playback.dart';
|
||||
import 'package:spotube/utils/primitive_utils.dart';
|
||||
@ -59,7 +60,7 @@ class SiblingTracksSheet extends HookConsumerWidget {
|
||||
itemCount: playback.siblingYtVideos.length,
|
||||
itemBuilder: (context, index) {
|
||||
final video = playback.siblingYtVideos[index];
|
||||
return ListTile(
|
||||
return PlatformListTile(
|
||||
title: Text(video.title),
|
||||
leading: UniversalImage(
|
||||
path: video.thumbnails.lowResUrl,
|
||||
@ -69,7 +70,6 @@ class SiblingTracksSheet extends HookConsumerWidget {
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
horizontalTitleGap: 10,
|
||||
trailing: Text(
|
||||
PrimitiveUtils.toReadableDuration(
|
||||
video.duration ?? Duration.zero,
|
||||
|
@ -77,13 +77,13 @@ class PlaylistCreateDialog extends HookConsumerWidget {
|
||||
const SizedBox(height: 10),
|
||||
CheckboxListTile(
|
||||
value: public.value,
|
||||
title: const Text("Public"),
|
||||
title: const PlatformText("Public"),
|
||||
onChanged: (val) => public.value = val ?? false,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
CheckboxListTile(
|
||||
value: collaborative.value,
|
||||
title: const Text("Collaborative"),
|
||||
title: const PlatformText("Collaborative"),
|
||||
onChanged: (val) => collaborative.value = val ?? false,
|
||||
),
|
||||
],
|
||||
|
@ -78,6 +78,7 @@ class Search extends HookConsumerWidget {
|
||||
return SafeArea(
|
||||
child: Material(
|
||||
color: PlatformTheme.of(context).scaffoldBackgroundColor,
|
||||
textStyle: PlatformTheme.of(context).textTheme!.body!,
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
|
@ -32,7 +32,7 @@ class About extends HookWidget {
|
||||
|
||||
return PlatformListTile(
|
||||
leading: const Icon(Icons.info_outline_rounded),
|
||||
title: Text(
|
||||
title: PlatformText(
|
||||
"About Spotube",
|
||||
style: PlatformTextTheme.of(context).body,
|
||||
),
|
||||
@ -48,7 +48,7 @@ class About extends HookWidget {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: const [
|
||||
Text("Author: "),
|
||||
PlatformText("Author: "),
|
||||
Hyperlink(
|
||||
"Kingkor Roy Tirtho",
|
||||
"https://github.com/KRTirtho",
|
||||
@ -63,12 +63,12 @@ class About extends HookWidget {
|
||||
"💚 Sponsor/Donate 💚",
|
||||
"https://opencollective.com/spotube",
|
||||
),
|
||||
Text(" • "),
|
||||
PlatformText(" • "),
|
||||
Hyperlink(
|
||||
"BSD-4-Clause LICENSE",
|
||||
"https://github.com/KRTirtho/spotube/blob/master/LICENSE",
|
||||
),
|
||||
Text(" • "),
|
||||
PlatformText(" • "),
|
||||
Hyperlink(
|
||||
"Bug Report",
|
||||
"https://github.com/KRTirtho/spotube/issues/new?assignees=&labels=bug&template=bug_report.md&title=",
|
||||
@ -76,7 +76,8 @@ class About extends HookWidget {
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
const Center(child: Text("© Spotube 2022. All rights reserved"))
|
||||
const Center(
|
||||
child: PlatformText("© Spotube 2022. All rights reserved"))
|
||||
]);
|
||||
},
|
||||
);
|
||||
|
@ -4,7 +4,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:macos_ui/macos_ui.dart';
|
||||
import 'package:platform_ui/platform_ui.dart';
|
||||
import 'package:spotube/components/Settings/About.dart';
|
||||
import 'package:spotube/components/Settings/ColorSchemePickerDialog.dart';
|
||||
@ -339,17 +338,14 @@ class Settings extends HookConsumerWidget {
|
||||
),
|
||||
AdaptiveListTile(
|
||||
leading: const Icon(Icons.screen_search_desktop_rounded),
|
||||
title: SizedBox(
|
||||
title: const SizedBox(
|
||||
height: 50,
|
||||
width: 200,
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: DefaultTextStyle(
|
||||
style: PlatformTextTheme.of(context).body!,
|
||||
child: const AutoSizeText(
|
||||
"Format of the YouTube Search term",
|
||||
maxLines: 2,
|
||||
),
|
||||
child: AutoSizeText(
|
||||
"Format of the YouTube Search term",
|
||||
maxLines: 2,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1,8 +1,5 @@
|
||||
import 'package:fluent_ui/fluent_ui.dart' as FluentUI;
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:macos_ui/macos_ui.dart';
|
||||
import 'package:platform_ui/platform_ui.dart';
|
||||
import 'package:spotube/components/Shared/HoverBuilder.dart';
|
||||
import 'package:spotube/components/Shared/SpotubeMarqueeText.dart';
|
||||
@ -54,10 +51,6 @@ class PlaybuttonCard extends HookWidget {
|
||||
),
|
||||
);
|
||||
|
||||
final titleStyle = PlatformTextTheme.of(context).body;
|
||||
|
||||
final descriptionStyle = PlatformTextTheme.of(context).caption;
|
||||
|
||||
final splash = usePlatformProperty<InteractiveInkFeatureFactory?>(
|
||||
(context) => PlatformProperty.multiPlatformGroup({
|
||||
InkRipple.splashFactory: {TargetPlatform.android, TargetPlatform.linux},
|
||||
@ -164,8 +157,8 @@ class PlaybuttonCard extends HookWidget {
|
||||
height: 20,
|
||||
child: SpotubeMarqueeText(
|
||||
text: title,
|
||||
style: titleStyle?.copyWith(
|
||||
fontWeight: FontWeight.bold),
|
||||
style:
|
||||
const TextStyle(fontWeight: FontWeight.bold),
|
||||
isHovering: isHovering,
|
||||
),
|
||||
),
|
||||
@ -176,7 +169,7 @@ class PlaybuttonCard extends HookWidget {
|
||||
height: 30,
|
||||
child: SpotubeMarqueeText(
|
||||
text: description!,
|
||||
style: descriptionStyle,
|
||||
style: PlatformTextTheme.of(context).caption,
|
||||
isHovering: isHovering,
|
||||
),
|
||||
),
|
||||
|
@ -26,12 +26,12 @@ class SpotubeMarqueeText extends HookWidget {
|
||||
return AutoSizeText(
|
||||
text,
|
||||
minFontSize: 13,
|
||||
style: style,
|
||||
style: DefaultTextStyle.of(context).style.merge(style),
|
||||
maxLines: 1,
|
||||
overflowReplacement: Marquee(
|
||||
key: uKey.value,
|
||||
text: text,
|
||||
style: style,
|
||||
style: DefaultTextStyle.of(context).style.merge(style),
|
||||
scrollAxis: Axis.horizontal,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
blankSpace: 40.0,
|
||||
|
@ -155,6 +155,7 @@ class TrackCollectionView<T> extends HookConsumerWidget {
|
||||
),
|
||||
),
|
||||
child: Material(
|
||||
textStyle: PlatformTheme.of(context).textTheme!.body!,
|
||||
type: MaterialType.transparency,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
|
@ -177,6 +177,7 @@ class TrackTile extends HookConsumerWidget {
|
||||
),
|
||||
child: Material(
|
||||
type: MaterialType.transparency,
|
||||
textStyle: PlatformTheme.of(context).textTheme!.body!,
|
||||
child: Row(
|
||||
children: [
|
||||
if (showCheck)
|
||||
|
@ -3,13 +3,11 @@ import 'dart:convert';
|
||||
import 'package:audio_service/audio_service.dart';
|
||||
import 'package:bitsdojo_window/bitsdojo_window.dart';
|
||||
import 'package:fl_query/fl_query.dart';
|
||||
import 'package:fluent_ui/fluent_ui.dart' as FluentUI;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:macos_ui/macos_ui.dart';
|
||||
import 'package:platform_ui/platform_ui.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:spotube/components/Shared/ReplaceDownloadedFileDialog.dart';
|
||||
@ -201,7 +199,7 @@ class SpotubeState extends ConsumerState<Spotube> with WidgetsBindingObserver {
|
||||
};
|
||||
}, []);
|
||||
|
||||
platform = TargetPlatform.windows;
|
||||
platform = TargetPlatform.macOS;
|
||||
|
||||
return PlatformApp.router(
|
||||
routeInformationParser: router.routeInformationParser,
|
||||
|
Loading…
Reference in New Issue
Block a user