fix(main): 보이스온 전용 카드 크기를 조정한다
This commit is contained in:
@@ -6,6 +6,15 @@ struct MainContentVoiceOnOnlySection: View {
|
||||
let action: (() -> Void)?
|
||||
let onTapSeries: (Int) -> Void
|
||||
|
||||
private let baseDeviceWidth: CGFloat = 402
|
||||
private let maxItemWidth: CGFloat = 163
|
||||
private let maxItemHeight: CGFloat = 230
|
||||
|
||||
private var itemSize: CGSize {
|
||||
let scale = min(1, UIScreen.main.bounds.width / baseDeviceWidth)
|
||||
return CGSize(width: maxItemWidth * scale, height: maxItemHeight * scale)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
if !items.isEmpty {
|
||||
VStack(alignment: .leading, spacing: SodaSpacing.s12) {
|
||||
@@ -20,13 +29,13 @@ struct MainContentVoiceOnOnlySection: View {
|
||||
ZStack(alignment: .topLeading) {
|
||||
DownsampledKFImage(
|
||||
url: URL(string: item.coverImageUrl),
|
||||
size: CGSize(width: 122, height: 172)
|
||||
size: itemSize
|
||||
)
|
||||
.background(Color.gray800)
|
||||
|
||||
originalTag
|
||||
}
|
||||
.frame(width: 122, height: 172)
|
||||
.frame(width: itemSize.width, height: itemSize.height)
|
||||
.clipShape(RoundedRectangle(cornerRadius: SodaSpacing.s14, style: .continuous))
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
|
||||
Reference in New Issue
Block a user