feat: added a header with title and settings button to the portals (#1467)

This commit is contained in:
Serhiy Mytrovtsiy
2023-05-19 18:13:06 +02:00
parent eb4f7b6784
commit 5a974e38cf
7 changed files with 77 additions and 20 deletions

View File

@@ -28,14 +28,16 @@ public class Portal: NSStackView, Portal_p {
self.layer?.backgroundColor = NSColor.windowBackgroundColor.cgColor
self.layer?.cornerRadius = 3
self.orientation = .horizontal
self.orientation = .vertical
self.distribution = .fillEqually
self.spacing = Constants.Popup.spacing*2
self.edgeInsets = NSEdgeInsets(
top: Constants.Popup.margins,
left: Constants.Popup.margins,
top: Constants.Popup.spacing*2,
left: Constants.Popup.spacing*2,
bottom: 0,
right: Constants.Popup.margins
right: Constants.Popup.spacing*2
)
self.addArrangedSubview(PortalHeader(name))
self.circle = HalfCircleGraphView()
self.circle!.toolTip = localizedString("GPU usage")