feat: rearranged network main view in the popup (download/upload stats)

This commit is contained in:
Serhiy Mytrovtsiy
2024-01-13 21:10:02 +01:00
parent e03964f0e5
commit 35839cea6a

View File

@@ -143,19 +143,19 @@ internal class Popup: PopupWrapper {
view.heightAnchor.constraint(equalToConstant: view.bounds.height).isActive = true
let leftPart: NSView = NSView(frame: NSRect(x: 0, y: 0, width: view.frame.width / 2, height: view.frame.height))
let uploadFields = self.topValueView(leftPart, title: localizedString("Uploading"), color: self.uploadColor)
self.uploadView = uploadFields.0
self.uploadValueField = uploadFields.1
self.uploadUnitField = uploadFields.2
self.uploadStateView = uploadFields.3
let rightPart: NSView = NSView(frame: NSRect(x: view.frame.width / 2, y: 0, width: view.frame.width / 2, height: view.frame.height))
let downloadFields = self.topValueView(rightPart, title: localizedString("Downloading"), color: self.downloadColor)
let downloadFields = self.topValueView(leftPart, title: localizedString("Downloading"), color: self.downloadColor)
self.downloadView = downloadFields.0
self.downloadValueField = downloadFields.1
self.downloadUnitField = downloadFields.2
self.downloadStateView = downloadFields.3
let rightPart: NSView = NSView(frame: NSRect(x: view.frame.width / 2, y: 0, width: view.frame.width / 2, height: view.frame.height))
let uploadFields = self.topValueView(rightPart, title: localizedString("Uploading"), color: self.uploadColor)
self.uploadView = uploadFields.0
self.uploadValueField = uploadFields.1
self.uploadUnitField = uploadFields.2
self.uploadStateView = uploadFields.3
view.addSubview(leftPart)
view.addSubview(rightPart)