mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-15 00:34:08 +09:00
feat: small hacks for the old macOS (#1233)
This commit is contained in:
@@ -68,7 +68,9 @@ class SettingsWindow: NSWindow, NSWindowDelegate, NSToolbarDelegate {
|
||||
newToolbar.showsBaselineSeparator = true
|
||||
newToolbar.delegate = self
|
||||
|
||||
self.toolbar = newToolbar
|
||||
if #available(macOS 11, *) {
|
||||
self.toolbar = newToolbar
|
||||
}
|
||||
self.contentViewController = sidebarViewController
|
||||
self.titlebarAppearsTransparent = true
|
||||
self.backgroundColor = .clear
|
||||
@@ -296,6 +298,12 @@ private class SidebarView: NSStackView {
|
||||
additionalButtons.addArrangedSubview(self.makeButton(title: localizedString("Support the application"), image: "donate", action: #selector(donate)))
|
||||
additionalButtons.addArrangedSubview(self.makeButton(title: localizedString("Close application"), image: "power", action: #selector(closeApp)))
|
||||
|
||||
let emptySpace = NSView()
|
||||
emptySpace.heightAnchor.constraint(equalToConstant: 28).isActive = true
|
||||
|
||||
if #unavailable(macOS 11) {
|
||||
self.addArrangedSubview(emptySpace)
|
||||
}
|
||||
self.addArrangedSubview(self.scrollView)
|
||||
self.addArrangedSubview(additionalButtons)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user