From c555502e0f12c646d85e13c7b0f2b921f7b4a6e7 Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Sun, 27 Nov 2022 16:26:04 -0800 Subject: [PATCH] Dashboard of cameras now renders fine after latest changes Issue #622 --- OctoPod/Panel UI/Dashboard/PrintersCameraGridViewCell.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OctoPod/Panel UI/Dashboard/PrintersCameraGridViewCell.swift b/OctoPod/Panel UI/Dashboard/PrintersCameraGridViewCell.swift index 0ca4c97..0ebc3d5 100644 --- a/OctoPod/Panel UI/Dashboard/PrintersCameraGridViewCell.swift +++ b/OctoPod/Panel UI/Dashboard/PrintersCameraGridViewCell.swift @@ -47,4 +47,9 @@ class PrintersCameraGridViewCell: UICollectionViewCell { @IBAction func expandButtonClicked(_ sender: Any) { delegate?.expandCameraClicked(cell: self) } + + override func preferredLayoutAttributesFitting(_ layoutAttributes: UICollectionViewLayoutAttributes) -> UICollectionViewLayoutAttributes { + layoutAttributes.bounds.size.height = systemLayoutSizeFitting(UIView.layoutFittingCompressedSize).height + return layoutAttributes + } }