fix: fixed MacBookPro16,4 year, fixed negative height for the disk popup

This commit is contained in:
Serhiy Mytrovtsiy
2024-08-31 18:09:41 +02:00
parent d76ff86e7a
commit 94352723aa
2 changed files with 2 additions and 2 deletions

View File

@@ -69,7 +69,7 @@ internal class Popup: PopupWrapper {
var h: CGFloat = 0
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 {
if h > 0 && self.frame.size.height != h {
self.setFrameSize(NSSize(width: self.frame.width, height: h))
self.sizeCallback?(self.frame.size)
}