diff --git a/MVMCoreUI/Atomic/Organisms/Carousel/Carousel.swift b/MVMCoreUI/Atomic/Organisms/Carousel/Carousel.swift index 4360c2c7..ea7d89b8 100644 --- a/MVMCoreUI/Atomic/Organisms/Carousel/Carousel.swift +++ b/MVMCoreUI/Atomic/Organisms/Carousel/Carousel.swift @@ -131,7 +131,6 @@ open class Carousel: View { inset.right = carouselModel?.rightPadding ?? Padding.Component.horizontalPaddingForSize(size) } collectionView.contentInset = inset - //(collectionView.collectionViewLayout as? UICollectionViewFlowLayout)?.sectionInset = inset // Update cells and re-layout. for cell in collectionView.visibleCells { diff --git a/MVMCoreUI/Atomic/Templates/CollectionTemplate.swift b/MVMCoreUI/Atomic/Templates/CollectionTemplate.swift index 14548606..b84792a6 100644 --- a/MVMCoreUI/Atomic/Templates/CollectionTemplate.swift +++ b/MVMCoreUI/Atomic/Templates/CollectionTemplate.swift @@ -100,6 +100,7 @@ let columns = templateModel?.columns, columns > 0, let cell = cell as? CollectionTemplateItemProtocol { let width = (size - collectionView.adjustedContentInset.left - collectionView.adjustedContentInset.right) / CGFloat(columns) + // Makes the width slightly less to avoid rounding errors and the column being a little too big. cell.set(width: width - 0.1) } } diff --git a/MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift b/MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift index d90206a3..950b6785 100644 --- a/MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift +++ b/MVMCoreUI/Atomic/Templates/MoleculeListTemplate.swift @@ -74,7 +74,7 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol let molecule = generateMoleculeView(from: footerModel) else { let view = super.viewForBottom() - view.backgroundColor = templateModel?.footerColor?.uiColor ?? .clear + view.backgroundColor = templateModel?.backgroundColor?.uiColor ?? .clear return view } diff --git a/MVMCoreUI/Atomic/Templates/ThreeLayerModelBase.swift b/MVMCoreUI/Atomic/Templates/ThreeLayerModelBase.swift index d14e78f3..9f130089 100644 --- a/MVMCoreUI/Atomic/Templates/ThreeLayerModelBase.swift +++ b/MVMCoreUI/Atomic/Templates/ThreeLayerModelBase.swift @@ -16,7 +16,6 @@ public var header: MoleculeModelProtocol? public var anchorFooter: Bool = false public var footer: MoleculeModelProtocol? - public var footerColor = Color(name: "white") public override var rootMolecules: [MoleculeModelProtocol] { [navigationBar, header, footer].compactMap { $0 } @@ -39,7 +38,6 @@ case header case anchorFooter case footer - case footerColor } //-------------------------------------------------- @@ -56,9 +54,6 @@ anchorFooter = anchor } footer = try typeContainer.decodeModelIfPresent(codingKey: .footer) - if let footerColor = try typeContainer.decodeIfPresent(Color.self, forKey: .footerColor) { - self.footerColor = footerColor - } try super.init(from: decoder) } @@ -69,6 +64,5 @@ try container.encodeModelIfPresent(header, forKey: .header) try container.encodeIfPresent(anchorFooter, forKey: .anchorFooter) try container.encodeModelIfPresent(footer, forKey: .footer) - try container.encodeIfPresent(footerColor, forKey: .footerColor) } }