feat: moved App settings from the menu to the bottom part of the sidebar

This commit is contained in:
Serhiy Mytrovtsiy
2025-09-23 16:59:26 +02:00
parent 1d4afd97e1
commit 3cd4d6b204
4 changed files with 21 additions and 28 deletions

View File

@@ -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

View File

@@ -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
}