mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
feat: changed icons to text buttons for application settings import/export/reset
This commit is contained in:
@@ -313,6 +313,15 @@ public extension NSView {
|
||||
return s
|
||||
}
|
||||
|
||||
func buttonView(_ action: Selector, text: String) -> NSButton {
|
||||
let button = NSButton()
|
||||
button.title = text
|
||||
button.contentTintColor = .labelColor
|
||||
button.action = action
|
||||
button.target = self
|
||||
return button
|
||||
}
|
||||
|
||||
func buttonIconView(_ action: Selector, icon: NSImage, height: CGFloat = 22) -> NSButton {
|
||||
let button = NSButton()
|
||||
button.heightAnchor.constraint(equalToConstant: height).isActive = true
|
||||
|
||||
Reference in New Issue
Block a user