mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
implement dynamic type for master feed list
This commit is contained in:
@@ -243,14 +243,3 @@ private extension MasterTimelineCellLayout {
|
||||
return r
|
||||
}
|
||||
}
|
||||
|
||||
private extension Array where Element == CGRect {
|
||||
|
||||
func maxY() -> CGFloat {
|
||||
|
||||
var y: CGFloat = 0.0
|
||||
self.forEach { y = Swift.max(y, $0.maxY) }
|
||||
return y
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -98,9 +98,12 @@ private extension MultilineUILabelSizer {
|
||||
}
|
||||
|
||||
var height = MultilineUILabelSizer.calculateHeight(string, width, font)
|
||||
let maxHeight = singleLineHeightEstimate * numberOfLines
|
||||
if height > maxHeight {
|
||||
height = maxHeight
|
||||
|
||||
if numberOfLines != 0 {
|
||||
let maxHeight = singleLineHeightEstimate * numberOfLines
|
||||
if height > maxHeight {
|
||||
height = maxHeight
|
||||
}
|
||||
}
|
||||
|
||||
cache[string]![width] = height
|
||||
|
||||
Reference in New Issue
Block a user