From f047775532e67ee24f5c6ebf8a2bdec7deb658ea Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Tue, 11 Oct 2022 16:41:23 +0800 Subject: [PATCH] Improve the replay button, give an overlay behind so its easier to see --- .../App/Views/AudioPlayer/MiniPlayer.swift | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/MiniPlayer.swift b/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/MiniPlayer.swift index 1f7621f94..69f1b45de 100644 --- a/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/MiniPlayer.swift +++ b/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/MiniPlayer.swift @@ -181,7 +181,16 @@ public struct MiniPlayer: View { }) if audioController.state == .reachedEnd { - // If we have reached the end display a replay button + // If we have reached the end display a replay button with an overlay behind + Color.systemBackground.opacity(0.85) + .frame( + minWidth: 0, + maxWidth: .infinity, + minHeight: 0, + maxHeight: .infinity, + alignment: .topLeading + ) + Button( action: { tabIndex = 0 @@ -189,12 +198,14 @@ public struct MiniPlayer: View { audioController.seek(to: 0.0) }, label: { - Image(systemName: "gobackward") - .font(.appCallout) - .tint(.appGrayTextContrast) - Text("Replay") + HStack { + Image(systemName: "gobackward") + .font(.appCallout) + .tint(.appGrayTextContrast) + Text("Replay") + } } - ) + ).buttonStyle(RoundedRectButtonStyle()) } } }