Skip to content

Commit 68a9c08

Browse files
committed
Update NSListContentView+ImageView.swift
1 parent 3becb1b commit 68a9c08

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Sources/AdvancedCollectionTableView/Configuration/Configurations/NSListContentConfiguration/NSListContentView+ImageView.swift

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ extension NSListContentView {
3232
intrinsicContentSize.width = (intrinsicContentSize.height * 2.5).rounded(.towardZero)
3333
return intrinsicContentSize
3434
}
35+
36+
if reservedLayoutSize.width == NSListContentConfiguration.ImageProperties.standardDimension {
37+
// intrinsicContentSize.width = intrinsicContentSize.width.c
38+
}
3539

3640
if let calculatedSize = calculatedSize {
3741
return calculatedSize
@@ -47,7 +51,16 @@ extension NSListContentView {
4751
}
4852

4953
var verticalConstraint: NSLayoutConstraint?
50-
var reservedLayoutSize: CGSize = .zero
54+
var reservedLayoutSize: CGSize = .zero {
55+
didSet {
56+
if reservedLayoutSize.width == NSListContentConfiguration.ImageProperties.standardDimension {
57+
reservedLayoutSize.width = 36.0
58+
}
59+
if reservedLayoutSize.height == NSListContentConfiguration.ImageProperties.standardDimension {
60+
reservedLayoutSize.height = 9.0
61+
}
62+
}
63+
}
5164

5265
func update() {
5366
imageScaling = image?.isSymbolImage == true ? .none : properties.scaling.imageScaling

0 commit comments

Comments
 (0)