Tighten inline player layout
This commit is contained in:
1 parent
f4721a5a21
commit
0f26b58933
3 files changed
+3
-5
No files matched your search
@@ -41,6 +41,7 @@ The iOS app should feel native to iOS and use an Apple Music-inspired **liquid g
|
|||||||
- Use Apple's standard red accent (`.red`) and otherwise prefer SwiftUI's semantic system colors and materials. Avoid custom color values unless the user asks for them.
|
- Use Apple's standard red accent (`.red`) and otherwise prefer SwiftUI's semantic system colors and materials. Avoid custom color values unless the user asks for them.
|
||||||
- Always add a SwiftUI preview for every UI view you create or update.
|
- Always add a SwiftUI preview for every UI view you create or update.
|
||||||
- Before completing code changes, run available linting and type checking or a build for the affected code. Fix errors introduced by the change, and clearly report any unrelated baseline or environment failures that prevent a clean check.
|
- Before completing code changes, run available linting and type checking or a build for the affected code. Fix errors introduced by the change, and clearly report any unrelated baseline or environment failures that prevent a clean check.
|
||||||
|
- Do not boot, open, or launch an iOS simulator without the user's explicit confirmation. This includes XcodeBuildMCP actions such as `build_run_sim` that automatically open the simulator. Prefer compile-only simulator builds when validation is needed.
|
||||||
- Reuse the web app’s backend API and data model. Inspect `~/music-v2` when route behavior, authentication, content fields, or feature scope is unclear.
|
- Reuse the web app’s backend API and data model. Inspect `~/music-v2` when route behavior, authentication, content fields, or feature scope is unclear.
|
||||||
- Match the web version’s structure and scope, while making the experience idiomatic to SwiftUI and iOS.
|
- Match the web version’s structure and scope, while making the experience idiomatic to SwiftUI and iOS.
|
||||||
- Update this document when the web app’s features, flows, design direction, or technical scope changes. Flag uncertainty for review instead of silently adding new product behavior.
|
- Update this document when the web app’s features, flows, design direction, or technical scope changes. Flag uncertainty for review instead of silently adding new product behavior.
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ struct MiniPlayerView: View {
|
|||||||
.truncationMode(.tail)
|
.truncationMode(.tail)
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
.layoutPriority(-1)
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
displayedIsPlaying.toggle()
|
displayedIsPlaying.toggle()
|
||||||
@@ -84,6 +85,7 @@ struct MiniPlayerView: View {
|
|||||||
.buttonStyle(.plain)
|
.buttonStyle(.plain)
|
||||||
.accessibilityLabel("Next track")
|
.accessibilityLabel("Next track")
|
||||||
}
|
}
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
.frame(height: 32)
|
.frame(height: 32)
|
||||||
.padding(.leading, usesCompactLayout ? 10 : 16)
|
.padding(.leading, usesCompactLayout ? 10 : 16)
|
||||||
.padding(.trailing, usesCompactLayout ? 9 : 14)
|
.padding(.trailing, usesCompactLayout ? 9 : 14)
|
||||||
|
|||||||
@@ -20,11 +20,6 @@ struct PlayerBottomAccessoryView: View {
|
|||||||
)
|
)
|
||||||
.padding(.horizontal, placement == .inline ? 4 : 0)
|
.padding(.horizontal, placement == .inline ? 4 : 0)
|
||||||
.frame(maxWidth: placement == .inline ? 320 : .infinity)
|
.frame(maxWidth: placement == .inline ? 320 : .infinity)
|
||||||
.glassEffect(
|
|
||||||
player.currentTrack == nil ? .clear : .regular.tint(.black.opacity(0.18)),
|
|
||||||
in: Capsule()
|
|
||||||
)
|
|
||||||
.shadow(color: .black.opacity(placement == .inline ? 0 : 0.08), radius: 8, y: 3)
|
|
||||||
.offset(y: 1 / displayScale)
|
.offset(y: 1 / displayScale)
|
||||||
.opacity(player.currentTrack == nil ? 0 : 1)
|
.opacity(player.currentTrack == nil ? 0 : 1)
|
||||||
.allowsHitTesting(player.currentTrack != nil)
|
.allowsHitTesting(player.currentTrack != nil)
|
||||||
|
|||||||
Reference in new issue
Block a user