mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
- fix Fans popup view size
- fix scroll position when open popup view
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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]) {
|
||||
|
||||
Reference in New Issue
Block a user