Skip to content

Commit 205f938

Browse files
committed
Bump version to 3.0.1 and match artwork corners to the shell
1 parent c58307e commit 205f938

2 files changed

Lines changed: 24 additions & 16 deletions

File tree

PlayStatus.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@
301301
"$(inherited)",
302302
"@executable_path/../Frameworks",
303303
);
304-
MARKETING_VERSION = 3.0;
304+
MARKETING_VERSION = 3.0.1;
305305
PRODUCT_BUNDLE_IDENTIFIER = com.bolar.PlayStatus;
306306
PRODUCT_NAME = "$(TARGET_NAME)";
307307
REGISTER_APP_GROUPS = NO;
@@ -354,7 +354,7 @@
354354
"$(inherited)",
355355
"@executable_path/../Frameworks",
356356
);
357-
MARKETING_VERSION = 3.0;
357+
MARKETING_VERSION = 3.0.1;
358358
PRODUCT_BUNDLE_IDENTIFIER = com.bolar.PlayStatus;
359359
PRODUCT_NAME = "$(TARGET_NAME)";
360360
REGISTER_APP_GROUPS = NO;

PlayStatus/UI/CommonComponents.swift

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,10 @@ struct ArtworkView: View {
851851
GeometryReader { geo in
852852
let side = min(geo.size.width, geo.size.height)
853853
let contentSide = side - 12
854-
let outer = RoundedRectangle(cornerRadius: 22, style: .continuous)
854+
let artworkShellCornerRadius: CGFloat = 22
855+
let artworkPlateInset = max(0, (side - contentSide) * 0.5)
856+
let artworkPlateCornerRadius = max(0, artworkShellCornerRadius - artworkPlateInset)
857+
let outer = RoundedRectangle(cornerRadius: artworkShellCornerRadius, style: .continuous)
855858
let inner = RoundedRectangle(cornerRadius: 18, style: .continuous)
856859

857860
ZStack {
@@ -903,7 +906,10 @@ struct ArtworkView: View {
903906
isActive: animatedArtworkIsVisible,
904907
animateOnFirstAppear: animateOnFirstAppear
905908
) {
906-
staticArtworkContent(side: contentSide)
909+
staticArtworkContent(
910+
side: contentSide,
911+
cornerRadius: artworkPlateCornerRadius
912+
)
907913
}
908914
.clipShape(inner, style: FillStyle(eoFill: false, antialiased: true))
909915
.overlay(inner.stroke(.white.opacity(0.1), lineWidth: 1))
@@ -920,25 +926,27 @@ struct ArtworkView: View {
920926
)
921927
}
922928
.frame(width: side, height: side)
923-
.clipped()
929+
.clipShape(outer, style: FillStyle(eoFill: false, antialiased: true))
924930
.compositingGroup()
925931
}
926932
.shadow(color: .black.opacity(0.28), radius: 16, x: 0, y: 10)
927933
}
928934

929935
@ViewBuilder
930-
private func staticArtworkContent(side: CGFloat) -> some View {
931-
if let image {
932-
Image(nsImage: image)
933-
.resizable()
934-
.interpolation(.high)
935-
.scaledToFill()
936-
.frame(width: side, height: side)
937-
.background(tint.opacity(0.12))
938-
} else {
939-
EmptyArtworkPlaceholderView()
940-
.frame(width: side, height: side)
936+
private func staticArtworkContent(side: CGFloat, cornerRadius: CGFloat) -> some View {
937+
Group {
938+
if let image {
939+
Image(nsImage: image)
940+
.resizable()
941+
.interpolation(.high)
942+
.scaledToFill()
943+
.background(tint.opacity(0.12))
944+
} else {
945+
EmptyArtworkPlaceholderView()
946+
}
941947
}
948+
.frame(width: side, height: side)
949+
.clipShape(RoundedRectangle(cornerRadius: cornerRadius, style: .continuous))
942950
}
943951
}
944952

0 commit comments

Comments
 (0)