Skip to content

Commit

Permalink
fix(home): adjust padding between sections for iPad layout
Browse files Browse the repository at this point in the history
  • Loading branch information
cyndichin committed May 3, 2023
1 parent 9f02064 commit 692e7ea
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class HomeViewControllerSectionProvider {
widthDimension: .fractionalWidth(itemWidthPercentage * Double(numberOfRecentSavesItems)),
heightDimension: .absolute(StyleConstants.groupHeight)
),
subitem: item,
repeatingSubitem: item,
count: numberOfRecentSavesItems
)
group.interItemSpacing = .fixed(16)
Expand Down Expand Up @@ -152,7 +152,7 @@ class HomeViewControllerSectionProvider {
let item = NSCollectionLayoutItem(layoutSize: itemSize)

let groupSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(0.8*Double(numberOfCarouselItems)), heightDimension: .absolute(StyleConstants.groupHeight))
let group = NSCollectionLayoutGroup.horizontal(layoutSize: groupSize, subitem: item, count: numberOfCarouselItems)
let group = NSCollectionLayoutGroup.horizontal(layoutSize: groupSize, repeatingSubitem: item, count: numberOfCarouselItems)
group.interItemSpacing = .fixed(16)

let section = NSCollectionLayoutSection(group: group)
Expand All @@ -179,7 +179,7 @@ class HomeViewControllerSectionProvider {
widthDimension: .fractionalWidth(1),
heightDimension: .absolute(StyleConstants.groupHeight)
),
subitem: .init(
repeatingSubitem: .init(
layoutSize: .init(
widthDimension: .fractionalWidth(0.5),
heightDimension: .fractionalHeight(1)
Expand All @@ -196,7 +196,7 @@ class HomeViewControllerSectionProvider {
widthDimension: .fractionalWidth(1),
heightDimension: .absolute(
numberOfGroups * StyleConstants.groupHeight +
(Constants.sectionSpacing * (numberOfGroups - 1))
(Constants.spacing * (numberOfGroups - 1))
)
),
subitems: groups
Expand Down

0 comments on commit 692e7ea

Please sign in to comment.