fix: dialog logo in android, lyrics visible timer adjust button

This commit is contained in:
Kingkor Roy Tirtho 2022-11-24 11:06:14 +06:00
parent be56ad4477
commit 3c6803bb3f
9 changed files with 57 additions and 48 deletions

View File

@ -18,7 +18,7 @@ class LyricDelayAdjustDialog extends HookConsumerWidget {
double.tryParse(controller.text.replaceAll("ms", "")) ?? 0; double.tryParse(controller.text.replaceAll("ms", "")) ?? 0;
return PlatformAlertDialog( return PlatformAlertDialog(
icon: Sidebar.brandLogo(), macosAppIcon: Sidebar.brandLogo(),
title: const Center(child: Text("Adjust Lyrics Delay")), title: const Center(child: Text("Adjust Lyrics Delay")),
secondaryActions: [ secondaryActions: [
PlatformFilledButton( PlatformFilledButton(
@ -41,7 +41,9 @@ class LyricDelayAdjustDialog extends HookConsumerWidget {
}, },
) )
], ],
content: Row( content: SizedBox(
height: 100,
child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
PlatformIconButton( PlatformIconButton(
@ -72,6 +74,7 @@ class LyricDelayAdjustDialog extends HookConsumerWidget {
), ),
], ],
), ),
),
); );
} }
} }

View File

@ -87,13 +87,18 @@ class SyncedLyrics extends HookConsumerWidget {
Positioned.fill( Positioned.fill(
child: Align( child: Align(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: PlatformIconButton( child: Padding(
tooltip: "Lyrics Delay", padding: const EdgeInsets.all(8.0),
icon: const Icon(Icons.av_timer_rounded), child: PlatformFilledButton(
child: const Icon(
Icons.av_timer_rounded,
size: 16,
),
onPressed: () async { onPressed: () async {
final delay = await showPlatformAlertDialog( final delay = await showPlatformAlertDialog(
context, context,
builder: (context) => const LyricDelayAdjustDialog(), builder: (context) =>
const LyricDelayAdjustDialog(),
); );
if (delay != null) { if (delay != null) {
ref.read(lyricDelayState.notifier).state = delay; ref.read(lyricDelayState.notifier).state = delay;
@ -102,6 +107,7 @@ class SyncedLyrics extends HookConsumerWidget {
), ),
), ),
), ),
),
], ],
), ),
), ),

View File

@ -26,7 +26,7 @@ class PlaylistCreateDialog extends HookConsumerWidget {
final collaborative = useState(false); final collaborative = useState(false);
return PlatformAlertDialog( return PlatformAlertDialog(
icon: Sidebar.brandLogo(), macosAppIcon: Sidebar.brandLogo(),
title: const Text("Create a Playlist"), title: const Text("Create a Playlist"),
primaryActions: [ primaryActions: [
PlatformFilledButton( PlatformFilledButton(

View File

@ -68,7 +68,7 @@ class ColorSchemePickerDialog extends HookConsumerWidget {
).key); ).key);
return PlatformAlertDialog( return PlatformAlertDialog(
icon: Sidebar.brandLogo(), macosAppIcon: Sidebar.brandLogo(),
title: Text("Pick ${schemeType.name} color scheme"), title: Text("Pick ${schemeType.name} color scheme"),
primaryActions: [ primaryActions: [
PlatformFilledButton( PlatformFilledButton(

View File

@ -41,7 +41,7 @@ class AdaptiveListTile extends HookWidget {
builder: (context) { builder: (context) {
return StatefulBuilder(builder: (context, update) { return StatefulBuilder(builder: (context, update) {
return PlatformAlertDialog( return PlatformAlertDialog(
icon: Sidebar.brandLogo(), macosAppIcon: Sidebar.brandLogo(),
title: title != null title: title != null
? Row( ? Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,

View File

@ -9,7 +9,7 @@ class DownloadConfirmationDialog extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return PlatformAlertDialog( return PlatformAlertDialog(
icon: Sidebar.brandLogo(), macosAppIcon: Sidebar.brandLogo(),
title: Padding( title: Padding(
padding: const EdgeInsets.all(15), padding: const EdgeInsets.all(15),
child: Row( child: Row(

View File

@ -16,7 +16,7 @@ class ReplaceDownloadedFileDialog extends ConsumerWidget {
final groupValue = ref.watch(replaceDownloadedFileState); final groupValue = ref.watch(replaceDownloadedFileState);
return PlatformAlertDialog( return PlatformAlertDialog(
icon: Sidebar.brandLogo(), macosAppIcon: Sidebar.brandLogo(),
title: Text("Track ${track.name} Already Exists"), title: Text("Track ${track.name} Already Exists"),
content: Column( content: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,

View File

@ -96,7 +96,7 @@ class TrackTile extends HookConsumerWidget {
return HookBuilder(builder: (context) { return HookBuilder(builder: (context) {
final playlistsCheck = useState(<String, bool>{}); final playlistsCheck = useState(<String, bool>{});
return PlatformAlertDialog( return PlatformAlertDialog(
icon: Sidebar.brandLogo(), macosAppIcon: Sidebar.brandLogo(),
title: PlatformText( title: PlatformText(
"Add `${track.value.name}` to following Playlists", "Add `${track.value.name}` to following Playlists",
style: const TextStyle( style: const TextStyle(

View File

@ -57,7 +57,7 @@ void useUpdateChecker(WidgetRef ref) {
const url = const url =
"https://spotube.netlify.app/other-downloads/stable-downloads"; "https://spotube.netlify.app/other-downloads/stable-downloads";
return PlatformAlertDialog( return PlatformAlertDialog(
icon: Sidebar.brandLogo(), macosAppIcon: Sidebar.brandLogo(),
title: const PlatformText("Spotube has an update"), title: const PlatformText("Spotube has an update"),
primaryActions: [ primaryActions: [
PlatformFilledButton( PlatformFilledButton(