diff --git a/lib/components/Home/Sidebar.dart b/lib/components/Home/Sidebar.dart index f31acde4e..483ba397d 100644 --- a/lib/components/Home/Sidebar.dart +++ b/lib/components/Home/Sidebar.dart @@ -32,7 +32,7 @@ class Sidebar extends HookConsumerWidget { Key? key, }) : super(key: key); - Widget _buildSmallLogo() { + static Widget brandLogo() { return Image.asset( "assets/spotube-logo.png", height: 50, @@ -135,7 +135,7 @@ class Sidebar extends HookConsumerWidget { (extended.value) ? Row( children: [ - _buildSmallLogo(), + brandLogo(), const SizedBox( width: 10, ), @@ -149,7 +149,7 @@ class Sidebar extends HookConsumerWidget { ), ], ) - : _buildSmallLogo(), + : brandLogo(), ], ), windowsFooterItems: [ diff --git a/lib/components/Library/UserLibrary.dart b/lib/components/Library/UserLibrary.dart index ef0134d0e..24718674b 100644 --- a/lib/components/Library/UserLibrary.dart +++ b/lib/components/Library/UserLibrary.dart @@ -16,6 +16,7 @@ class UserLibrary extends ConsumerWidget { length: 5, child: SafeArea( child: PlatformTabView( + androidIsScrollable: true, placement: PlatformProperty.all(PlatformTabbarPlacement.top), body: { PlatformTab( diff --git a/lib/components/Lyrics/LyricDelayAdjustDialog.dart b/lib/components/Lyrics/LyricDelayAdjustDialog.dart index 4a6dbcee4..65ead135b 100644 --- a/lib/components/Lyrics/LyricDelayAdjustDialog.dart +++ b/lib/components/Lyrics/LyricDelayAdjustDialog.dart @@ -2,6 +2,7 @@ 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/Home/Sidebar.dart'; import 'package:spotube/components/Lyrics/SyncedLyrics.dart'; class LyricDelayAdjustDialog extends HookConsumerWidget { @@ -17,6 +18,7 @@ class LyricDelayAdjustDialog extends HookConsumerWidget { double.tryParse(controller.text.replaceAll("ms", "")) ?? 0; return PlatformAlertDialog( + icon: Sidebar.brandLogo(), title: const Center(child: Text("Adjust Lyrics Delay")), secondaryActions: [ PlatformFilledButton( diff --git a/lib/components/Player/PlayerControls.dart b/lib/components/Player/PlayerControls.dart index 580a346c1..71779116a 100644 --- a/lib/components/Player/PlayerControls.dart +++ b/lib/components/Player/PlayerControls.dart @@ -98,7 +98,6 @@ class PlayerControls extends HookConsumerWidget { PlatformTooltip( message: "Slide to seek forward or backward", child: PlatformSlider( - focusNode: FocusNode(), // cannot divide by zero // there's an edge case for value being bigger // than total duration. Keeping it resolved diff --git a/lib/components/Playlist/PlaylistCreateDialog.dart b/lib/components/Playlist/PlaylistCreateDialog.dart index 15503f17f..ab96fc774 100644 --- a/lib/components/Playlist/PlaylistCreateDialog.dart +++ b/lib/components/Playlist/PlaylistCreateDialog.dart @@ -3,6 +3,7 @@ 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/Home/Sidebar.dart'; import 'package:spotube/provider/SpotifyDI.dart'; import 'package:spotube/provider/SpotifyRequests.dart'; @@ -25,6 +26,7 @@ class PlaylistCreateDialog extends HookConsumerWidget { final collaborative = useState(false); return PlatformAlertDialog( + icon: Sidebar.brandLogo(), title: const Text("Create a Playlist"), primaryActions: [ PlatformFilledButton( diff --git a/lib/components/Settings/ColorSchemePickerDialog.dart b/lib/components/Settings/ColorSchemePickerDialog.dart index 8bd14935f..84a515d46 100644 --- a/lib/components/Settings/ColorSchemePickerDialog.dart +++ b/lib/components/Settings/ColorSchemePickerDialog.dart @@ -2,6 +2,7 @@ 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/Home/Sidebar.dart'; import 'package:spotube/provider/UserPreferences.dart'; final highContrast = MaterialColor( @@ -67,6 +68,7 @@ class ColorSchemePickerDialog extends HookConsumerWidget { ).key); return PlatformAlertDialog( + icon: Sidebar.brandLogo(), title: Text("Pick ${schemeType.name} color scheme"), primaryActions: [ PlatformFilledButton( diff --git a/lib/components/Settings/Settings.dart b/lib/components/Settings/Settings.dart index 8b9823427..908c13300 100644 --- a/lib/components/Settings/Settings.dart +++ b/lib/components/Settings/Settings.dart @@ -315,7 +315,7 @@ class Settings extends HookConsumerWidget { "Recommendation Country", ), trailing: (context, update) => ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 250), + constraints: const BoxConstraints(maxWidth: 350), child: PlatformDropDownMenu( value: preferences.recommendationMarket, items: spotifyMarkets diff --git a/lib/components/Shared/AdaptiveListTile.dart b/lib/components/Shared/AdaptiveListTile.dart index 3d219ee81..e2a0eeae4 100644 --- a/lib/components/Shared/AdaptiveListTile.dart +++ b/lib/components/Shared/AdaptiveListTile.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:platform_ui/platform_ui.dart'; +import 'package:spotube/components/Home/Sidebar.dart'; import 'package:spotube/hooks/useBreakpoints.dart'; class AdaptiveListTile extends HookWidget { @@ -39,6 +40,7 @@ class AdaptiveListTile extends HookWidget { builder: (context) { return StatefulBuilder(builder: (context, update) { return PlatformAlertDialog( + icon: Sidebar.brandLogo(), title: title != null ? Row( crossAxisAlignment: CrossAxisAlignment.center, diff --git a/lib/components/Shared/DownloadConfirmationDialog.dart b/lib/components/Shared/DownloadConfirmationDialog.dart index 5e770b31f..d2f6d68c5 100644 --- a/lib/components/Shared/DownloadConfirmationDialog.dart +++ b/lib/components/Shared/DownloadConfirmationDialog.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:platform_ui/platform_ui.dart'; +import 'package:spotube/components/Home/Sidebar.dart'; import 'package:spotube/components/Shared/UniversalImage.dart'; class DownloadConfirmationDialog extends StatelessWidget { @@ -8,6 +9,7 @@ class DownloadConfirmationDialog extends StatelessWidget { @override Widget build(BuildContext context) { return PlatformAlertDialog( + icon: Sidebar.brandLogo(), title: Padding( padding: const EdgeInsets.all(15), child: Row( diff --git a/lib/components/Shared/PageWindowTitleBar.dart b/lib/components/Shared/PageWindowTitleBar.dart index 06fd4923c..9f139b8b0 100644 --- a/lib/components/Shared/PageWindowTitleBar.dart +++ b/lib/components/Shared/PageWindowTitleBar.dart @@ -1,4 +1,5 @@ import 'package:bitsdojo_window/bitsdojo_window.dart'; +import 'package:fluent_ui/fluent_ui.dart' show FluentTheme; import 'package:flutter/material.dart'; import 'package:platform_ui/platform_ui.dart'; import 'package:spotube/utils/platform.dart'; @@ -112,7 +113,8 @@ class PageWindowTitleBar extends StatelessWidget } return WindowTitleBarBox( child: Container( - color: backgroundColor, + color: backgroundColor ?? + FluentTheme.maybeOf(context)?.micaBackgroundColor, child: Row( children: [ if (kIsMacOS) diff --git a/lib/components/Shared/ReplaceDownloadedFileDialog.dart b/lib/components/Shared/ReplaceDownloadedFileDialog.dart index 582637469..1c3b16f0b 100644 --- a/lib/components/Shared/ReplaceDownloadedFileDialog.dart +++ b/lib/components/Shared/ReplaceDownloadedFileDialog.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:platform_ui/platform_ui.dart'; import 'package:spotify/spotify.dart'; +import 'package:spotube/components/Home/Sidebar.dart'; final replaceDownloadedFileState = StateProvider((ref) => null); @@ -15,6 +16,7 @@ class ReplaceDownloadedFileDialog extends ConsumerWidget { final groupValue = ref.watch(replaceDownloadedFileState); return PlatformAlertDialog( + icon: Sidebar.brandLogo(), title: Text("Track ${track.name} Already Exists"), content: Column( mainAxisSize: MainAxisSize.min, diff --git a/lib/components/Shared/TrackTile.dart b/lib/components/Shared/TrackTile.dart index 8ecdadd90..dc29f82bd 100644 --- a/lib/components/Shared/TrackTile.dart +++ b/lib/components/Shared/TrackTile.dart @@ -4,6 +4,7 @@ import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:platform_ui/platform_ui.dart'; import 'package:spotify/spotify.dart' hide Image; +import 'package:spotube/components/Home/Sidebar.dart'; import 'package:spotube/components/Shared/AdaptivePopupMenuButton.dart'; import 'package:spotube/components/Shared/HeartButton.dart'; import 'package:spotube/components/Shared/LinkText.dart'; @@ -95,6 +96,7 @@ class TrackTile extends HookConsumerWidget { return HookBuilder(builder: (context) { final playlistsCheck = useState({}); return PlatformAlertDialog( + icon: Sidebar.brandLogo(), title: PlatformText( "Add `${track.value.name}` to following Playlists", style: const TextStyle( diff --git a/lib/hooks/useUpdateChecker.dart b/lib/hooks/useUpdateChecker.dart index 8105b1195..797e6dc30 100644 --- a/lib/hooks/useUpdateChecker.dart +++ b/lib/hooks/useUpdateChecker.dart @@ -6,6 +6,7 @@ import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:http/http.dart' as http; import 'package:platform_ui/platform_ui.dart'; +import 'package:spotube/components/Home/Sidebar.dart'; import 'package:spotube/components/Shared/AnchorButton.dart'; import 'package:spotube/hooks/usePackageInfo.dart'; import 'package:spotube/provider/UserPreferences.dart'; @@ -56,6 +57,7 @@ void useUpdateChecker(WidgetRef ref) { const url = "https://spotube.netlify.app/other-downloads/stable-downloads"; return PlatformAlertDialog( + icon: Sidebar.brandLogo(), title: const PlatformText("Spotube has an update"), primaryActions: [ PlatformFilledButton( diff --git a/lib/main.dart b/lib/main.dart index c64ced901..73df95998 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -199,7 +199,7 @@ class SpotubeState extends ConsumerState with WidgetsBindingObserver { }; }, []); - platform = TargetPlatform.android; + platform = TargetPlatform.macOS; return PlatformApp.router( routeInformationParser: router.routeInformationParser, diff --git a/lib/themes/dark-theme.dart b/lib/themes/dark-theme.dart index 057b380d7..c47abeac5 100644 --- a/lib/themes/dark-theme.dart +++ b/lib/themes/dark-theme.dart @@ -72,7 +72,7 @@ ThemeData darkTheme({ ), dialogTheme: DialogTheme(backgroundColor: backgroundMaterialColor[900]), cardColor: backgroundMaterialColor[800], - canvasColor: backgroundMaterialColor[900], + canvasColor: backgroundMaterialColor[800], listTileTheme: const ListTileThemeData(horizontalTitleGap: 0), checkboxTheme: CheckboxThemeData( fillColor: MaterialStateProperty.resolveWith((states) {