fix: fixed height calculation for disk popup view (#2095)

This commit is contained in:
Serhiy Mytrovtsiy
2024-08-30 19:39:08 +02:00
parent 3c6856b169
commit d76ff86e7a

View File

@@ -67,13 +67,8 @@ internal class Popup: PopupWrapper {
private func recalculateHeight() {
var h: CGFloat = 0
self.arrangedSubviews.forEach { v in
if let v = v as? NSStackView {
h += v.arrangedSubviews.map({ $0.bounds.height }).reduce(0, +)
} else {
h += v.bounds.height
}
}
h += self.disks.subviews.map({ $0.frame.height + self.disks.spacing }).reduce(0, +) - self.disks.spacing
h += self.processesHeight
if self.frame.size.height != h {
self.setFrameSize(NSSize(width: self.frame.width, height: h))
self.sizeCallback?(self.frame.size)