- update settings view (moved all view to one scroll view)

This commit is contained in:
Serhiy Mytrovtsiy
2020-08-01 19:56:57 +02:00
parent cd502bfff5
commit e24a9ef2a2
7 changed files with 157 additions and 71 deletions

View File

@@ -32,7 +32,12 @@ internal class Settings: NSView, Settings_v {
self.title = title
self.store = store
super.init(frame: CGRect(x: Constants.Settings.margin, y: Constants.Settings.margin, width: Constants.Settings.width - (Constants.Settings.margin*2), height: 0))
super.init(frame: CGRect(
x: 0,
y: 0,
width: Constants.Settings.width - (Constants.Settings.margin*2),
height: 0
))
self.wantsLayer = true
self.canDrawConcurrently = true

View File

@@ -38,8 +38,8 @@ internal class Settings: NSView, Settings_v {
}
super.init(frame: CGRect(
x: Constants.Settings.margin,
y: Constants.Settings.margin,
x: 0,
y: 0,
width: Constants.Settings.width - (Constants.Settings.margin*2),
height: 0
))

View File

@@ -35,8 +35,8 @@ internal class Settings: NSView, Settings_v {
self.updateIntervalValue = store.pointee.string(key: "\(self.title)_updateInterval", defaultValue: self.updateIntervalValue)
super.init(frame: CGRect(
x: Constants.Settings.margin,
y: Constants.Settings.margin,
x: 0,
y: 0,
width: Constants.Settings.width - (Constants.Settings.margin*2),
height: 0
))

View File

@@ -29,8 +29,8 @@ internal class Settings: NSView, Settings_v {
self.updateIntervalValue = store.pointee.string(key: "\(self.title)_updateInterval", defaultValue: self.updateIntervalValue)
super.init(frame: CGRect(
x: Constants.Settings.margin,
y: Constants.Settings.margin,
x: 0,
y: 0,
width: Constants.Settings.width - (Constants.Settings.margin*2),
height: 0
))

View File

@@ -27,7 +27,12 @@ internal class Settings: NSView, Settings_v {
self.title = title
self.store = store
super.init(frame: CGRect(x: Constants.Settings.margin, y: Constants.Settings.margin, width: Constants.Settings.width - (Constants.Settings.margin*2), height: 0))
super.init(frame: CGRect(
x: 0,
y: 0,
width: Constants.Settings.width - (Constants.Settings.margin*2),
height: 0
))
for interface in SCNetworkInterfaceCopyAll() as NSArray {
if let bsdName = SCNetworkInterfaceGetBSDName(interface as! SCNetworkInterface),

View File

@@ -30,8 +30,8 @@ internal class Settings: NSView, Settings_v {
self.list = list
super.init(frame: CGRect(
x: Constants.Settings.margin,
y: Constants.Settings.margin,
x: 0,
y: 0,
width: Constants.Settings.width - (Constants.Settings.margin*2),
height: 0
))