fix: fixed wrong components adjustment when changing the number of top processes (#673)

This commit is contained in:
Serhiy Mytrovtsiy
2021-10-26 17:02:44 +02:00
parent 63d48d128e
commit 3bf846fa0f

View File

@@ -106,13 +106,13 @@ internal class Popup: NSView, Popup_p {
DispatchQueue.main.async(execute: {
self.processes = []
let h: CGFloat = self.dashboardHeight + self.chartHeight + self.detailsHeight + self.processesHeight
let h: CGFloat = self.dashboardHeight + self.chartHeight + self.detailsHeight + self.averageHeight + self.processesHeight
self.setFrameSize(NSSize(width: self.frame.width, height: h))
self.grid?.setFrameSize(NSSize(width: self.frame.width, height: h))
self.grid?.row(at: 3).cell(at: 0).contentView?.removeFromSuperview()
self.grid?.removeRow(at: 3)
self.grid?.row(at: 4).cell(at: 0).contentView?.removeFromSuperview()
self.grid?.removeRow(at: 4)
self.grid?.addRow(with: [self.initProcesses()])
self.initializedProcesses = false