mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
feat: moved App settings from the menu to the bottom part of the sidebar
This commit is contained in:
@@ -294,7 +294,7 @@ public extension NSView {
|
||||
}
|
||||
|
||||
func selectView(action: Selector, items: [KeyValue_p], selected: String) -> NSPopUpButton {
|
||||
let select: NSPopUpButton = NSPopUpButton(frame: NSRect(x: 0, y: 0, width: 50, height: 28))
|
||||
let select: NSPopUpButton = NSPopUpButton(frame: NSRect(x: 0, y: 4, width: 50, height: 28))
|
||||
select.target = self
|
||||
select.action = action
|
||||
|
||||
|
||||
@@ -1245,17 +1245,15 @@ public class PreferencesSection: NSStackView {
|
||||
|
||||
self.container.orientation = .vertical
|
||||
self.container.wantsLayer = true
|
||||
self.container.layer?.cornerRadius = 5
|
||||
self.container.layer?.borderColor = NSColor.separatorColor.withAlphaComponent(0.05).cgColor
|
||||
self.container.layer?.borderWidth = 1
|
||||
self.container.layer?.backgroundColor = NSColor.quaternaryLabelColor.withAlphaComponent(0.025).cgColor
|
||||
self.container.layer?.cornerRadius = Constants.Settings.margin
|
||||
self.container.edgeInsets = NSEdgeInsets(
|
||||
top: Constants.Settings.margin/2,
|
||||
top: Constants.Settings.margin/1.25,
|
||||
left: Constants.Settings.margin,
|
||||
bottom: Constants.Settings.margin/2,
|
||||
bottom: Constants.Settings.margin/1.25,
|
||||
right: Constants.Settings.margin
|
||||
)
|
||||
self.container.spacing = Constants.Settings.margin/2
|
||||
self.container.spacing = Constants.Settings.margin/1.25
|
||||
self.addArrangedSubview(self.container)
|
||||
|
||||
for item in components {
|
||||
@@ -1268,7 +1266,6 @@ public class PreferencesSection: NSStackView {
|
||||
}
|
||||
|
||||
public override func updateLayer() {
|
||||
self.container.layer?.borderColor = NSColor.separatorColor.withAlphaComponent(0.05).cgColor
|
||||
self.container.layer?.backgroundColor = NSColor.quaternaryLabelColor.withAlphaComponent(0.025).cgColor
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user