iOS: Increase library list item size (#881)
This commit is contained in:
parent
46563c74ae
commit
333530a938
|
@ -17,13 +17,15 @@ struct LibraryItemRow: View {
|
|||
private let item: BaseItemDto
|
||||
private var onSelect: () -> Void
|
||||
|
||||
private let posterWidth: CGFloat = 60
|
||||
|
||||
var body: some View {
|
||||
Button {
|
||||
onSelect()
|
||||
} label: {
|
||||
HStack(alignment: .bottom) {
|
||||
ImageView(item.portraitPosterImageSource(maxWidth: 60))
|
||||
.posterStyle(type: .portrait, width: 60)
|
||||
ImageView(item.portraitPosterImageSource(maxWidth: posterWidth))
|
||||
.posterStyle(type: .portrait, width: posterWidth)
|
||||
.posterShadow()
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
|
|
|
@ -23,11 +23,13 @@ struct PagingLibraryView: View {
|
|||
|
||||
private var onSelect: (BaseItemDto) -> Void
|
||||
|
||||
private let portraitPosterScale = 1.25
|
||||
|
||||
private var gridLayout: NSCollectionLayoutSection.GridLayoutMode {
|
||||
if libraryGridPosterType == .landscape && UIDevice.isPhone {
|
||||
return .fixedNumberOfColumns(2)
|
||||
} else {
|
||||
return .adaptive(withMinItemSize: libraryGridPosterType.width + (UIDevice.isIPad ? 10 : 0))
|
||||
return .adaptive(withMinItemSize: libraryGridPosterType.width * portraitPosterScale + 10)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,7 +64,7 @@ struct PagingLibraryView: View {
|
|||
private var libraryGridView: some View {
|
||||
CollectionView(items: viewModel.items.elements) { _, item, _ in
|
||||
PosterButton(state: .item(item), type: libraryGridPosterType)
|
||||
.scaleItem(libraryGridPosterType == .landscape && UIDevice.isPhone ? 0.85 : 1)
|
||||
.scaleItem(libraryGridPosterType == .landscape && UIDevice.isPhone ? 0.85 : portraitPosterScale)
|
||||
.onSelect {
|
||||
onSelect(item)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue