File tree 2 files changed +25
-34
lines changed
2 files changed +25
-34
lines changed Original file line number Diff line number Diff line change @@ -198,6 +198,7 @@ extension ContentDestination: NavigationDestination {
198
198
VStack ( alignment: . leading, spacing: spacing) {
199
199
#if os(macOS)
200
200
BackButtonView ( )
201
+ . padding ( . top, 12 )
201
202
. offset ( y: 5 )
202
203
#endif
203
204
@@ -227,23 +228,15 @@ extension ContentDestination: NavigationDestination {
227
228
struct BackButtonView : View {
228
229
@Environment ( \. navigator) private var navigator
229
230
230
- @State private var isHovering = false
231
-
232
231
var body : some View {
233
- Image ( systemSymbol: . chevronBackward)
234
- . frame ( width: 22 , height: 22 )
235
- . background (
236
- RoundedRectangle ( cornerRadius: 4 )
237
- . fill ( isHovering ? Color ( . secondarySystemFill) : . clear)
238
- )
239
- . padding ( . top, 12 )
240
- . animation ( . interactiveSpring, value: isHovering)
241
- . onHover { value in
242
- isHovering = value
243
- }
244
- . onTapGesture {
245
- navigator. back ( )
246
- }
232
+ Button ( action: {
233
+ navigator. back ( )
234
+ } ) {
235
+ Image ( systemSymbol: . chevronBackward)
236
+ . frame ( width: 22 , height: 22 )
237
+ . contentShape ( Circle ( ) )
238
+ }
239
+ . button ( )
247
240
}
248
241
}
249
242
#endif
Original file line number Diff line number Diff line change @@ -26,33 +26,31 @@ struct SongView: View {
26
26
var body : some View {
27
27
HStack ( spacing: 15 ) {
28
28
Group {
29
- # if os(iOS)
30
- if mpd . status . song != song {
29
+ if mpd . status . song != song {
30
+ # if os(iOS)
31
31
Text ( String ( song. track) )
32
32
. font ( . title3)
33
33
. fontWeight ( . regular)
34
34
. foregroundStyle ( . secondary)
35
35
. frame ( width: 20 )
36
- } else {
37
- WaveView ( )
38
- }
39
- #elseif os(macOS)
40
- if !isHovering, mpd. status. song != song {
41
- Text ( String ( song. track) )
42
- . font ( . title3)
43
- . fontWeight ( . regular)
44
- . foregroundStyle ( . secondary)
45
- . frame ( width: 20 )
46
- } else {
47
- if mpd. status. song == song {
48
- WaveView ( )
49
- } else {
36
+ #elseif os(macOS)
37
+ if isHovering {
50
38
Image ( systemSymbol: . playFill)
51
39
. font ( . title3)
52
40
. foregroundColor ( . accentColor)
41
+ . transition ( . opacity)
42
+
43
+ } else {
44
+ Text ( String ( song. track) )
45
+ . font ( . title3)
46
+ . fontWeight ( . regular)
47
+ . foregroundStyle ( . secondary)
48
+ . frame ( width: 20 )
53
49
}
54
- }
55
- #endif
50
+ #endif
51
+ } else {
52
+ WaveView ( )
53
+ }
56
54
}
57
55
. frame ( width: 20 )
58
56
You can’t perform that action at this time.
0 commit comments