diff --git a/dimensionhub/Views/IndexView.swift b/dimensionhub/Views/IndexView.swift index 3cbf268..3678f93 100644 --- a/dimensionhub/Views/IndexView.swift +++ b/dimensionhub/Views/IndexView.swift @@ -176,7 +176,7 @@ struct IndexView: View { } placeholder: { ProgressView() } - .frame(width: .infinity, height: 180) + .frame(width: 370, height: 180) .overlay { HStack { VStack(alignment: .leading, spacing: 10) { @@ -268,26 +268,27 @@ extension IndexView { } ScrollView(.horizontal, showsIndicators: false) { - HStack(alignment: .center, spacing: 10) { + HStack(alignment: .center, spacing: 5) { ForEach(dramaItem.episodes, id: \.id) { item in VStack(alignment: .center) { - AsyncImage(url: URL(string: item.thumb)) { image in - image.resizable() - } placeholder: { - ProgressView() - } - .frame(width: 80, height: 80) - .overlay { - Text(item.numName) + GeometryReader { geometry in + AsyncImage(url: URL(string: item.thumb)) { image in + image.resizable() + } placeholder: { + ProgressView() + } + .frame(width: geometry.frame(in: .local).width, height: 80) + .overlay { + Text(item.numName) + } } Text(item.name) .lineLimit(1) } - .frame(width: 100, height: 120) + .frame(width: 120, height: 120) } } - .border(Color.red) } } }