- fix Fans popup view size

- fix scroll position when open popup view
This commit is contained in:
Serhiy Mytrovtsiy
2020-10-31 20:03:01 +01:00
parent e5808b8556
commit 10dedf6fb1
2 changed files with 5 additions and 0 deletions

View File

@@ -174,6 +174,10 @@ internal class PopupView: NSView {
x: self?.header.frame.origin.x ?? 0,
y: (self?.body.frame.height ?? 0) + (Constants.Popup.margins*2)
))
if let documentView = self?.body.documentView {
documentView.scroll(NSPoint(x: 0, y: documentView.bounds.size.height))
}
}
}
}

View File

@@ -61,6 +61,7 @@ internal class Popup: NSView, Popup_p {
self.addSubview(view)
self.setFrameSize(NSSize(width: self.frame.width, height: view.frame.height))
self.sizeCallback?(self.frame.size)
}
internal func usageCallback(_ values: [Fan]) {