mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Fixed 1 color picker bug made home UI padding
This commit is contained in:
parent
aecbe2ac35
commit
90b5dae3ba
12 changed files with 58 additions and 122 deletions
|
|
@ -33,7 +33,6 @@ struct MusicPlayerView: View {
|
|||
var body: some View {
|
||||
HStack(alignment: .top, spacing: 12) {
|
||||
AlbumArtView(vm: vm, albumArtNamespace: albumArtNamespace)
|
||||
.padding(.all, 5)
|
||||
MusicControlsView()
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
|
|
@ -61,7 +60,7 @@ struct AlbumArtView: View {
|
|||
.background(
|
||||
Image(nsImage: musicManager.albumArt)
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.scaledToFill()
|
||||
)
|
||||
.clipped()
|
||||
.clipShape(
|
||||
|
|
@ -86,7 +85,9 @@ struct AlbumArtView: View {
|
|||
appIconOverlay
|
||||
}
|
||||
.albumArtFlip(angle: musicManager.flipAngle)
|
||||
.parallax3D(magnitude: 12)
|
||||
.parallax3D()
|
||||
.padding(.bottom, -5)
|
||||
|
||||
}
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
.scaleEffect(musicManager.isPlaying ? 1 : 0.85)
|
||||
|
|
@ -109,7 +110,8 @@ struct AlbumArtView: View {
|
|||
.overlay {
|
||||
Image(nsImage: musicManager.albumArt)
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.scaledToFill() //to ensure the thumbnail will always be within the square icon
|
||||
|
||||
}
|
||||
.matchedGeometryEffect(id: "albumArt", in: albumArtNamespace)
|
||||
.clipped()
|
||||
|
|
@ -126,8 +128,8 @@ struct AlbumArtView: View {
|
|||
if vm.notchState == .open && !musicManager.usingAppIconForArtwork {
|
||||
AppIcon(for: musicManager.bundleIdentifier ?? "com.apple.Music")
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.frame(width: 30, height: 30)
|
||||
.scaledToFill()
|
||||
.frame(width: 36, height: 36)
|
||||
.offset(x: 10, y: 10)
|
||||
.transition(.scale.combined(with: .opacity).animation(.bouncy.delay(0.3)))
|
||||
.zIndex(2)
|
||||
|
|
@ -207,9 +209,9 @@ struct MusicControlsView: View {
|
|||
|
||||
MarqueeText(
|
||||
lyricsBinding,
|
||||
font: .headline,
|
||||
font: .system(size: 12, weight: .regular),
|
||||
nsFont: .headline,
|
||||
textColor: .white.opacity(0.8),
|
||||
textColor: .white.opacity(0.7),
|
||||
minDuration: 0.35,
|
||||
frameWidth: width
|
||||
)
|
||||
|
|
@ -605,6 +607,7 @@ struct NotchHomeView: View {
|
|||
.combined(with: .blurReplace.animation(.smooth.speed(0.9)))
|
||||
.combined(with: .move(edge: .top)))
|
||||
.blur(radius: vm.notchState == .closed ? 30 : 0)
|
||||
.padding(8) //Put the main padding here for consistency!!!
|
||||
}
|
||||
|
||||
private var minimalisticOverridePayload: ExtensionNotchExperiencePayload? {
|
||||
|
|
@ -713,6 +716,7 @@ struct MusicSliderView: View {
|
|||
LiveStreamProgressIndicator(tint: sliderTint)
|
||||
.frame(maxWidth: .infinity)
|
||||
.frame(height: sliderFrameHeight)
|
||||
|
||||
case .inline:
|
||||
HStack(spacing: 10) {
|
||||
Spacer()
|
||||
|
|
@ -720,6 +724,7 @@ struct MusicSliderView: View {
|
|||
LiveStreamProgressIndicator(tint: sliderTint)
|
||||
.frame(maxWidth: .infinity)
|
||||
.frame(height: sliderFrameHeight)
|
||||
|
||||
Spacer()
|
||||
.frame(width: 48)
|
||||
}
|
||||
|
|
@ -748,10 +753,10 @@ struct MusicSliderView: View {
|
|||
)
|
||||
}
|
||||
|
||||
private var sliderTint: Color {
|
||||
private var sliderTint: Color {//
|
||||
switch Defaults[.sliderColor] {
|
||||
case .albumArt:
|
||||
return Color(nsColor: color).ensureMinimumBrightness(factor: 0.8)
|
||||
return Color(nsColor: color).ensureMinimumBrightness(factor: 0.6)
|
||||
case .accent:
|
||||
return .accentColor
|
||||
case .white:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue