feat: changed icons to text buttons for application settings import/export/reset

This commit is contained in:
Serhiy Mytrovtsiy
2025-02-06 16:33:42 +01:00
parent 11158df5b1
commit f9b522aeb3
20 changed files with 35 additions and 143 deletions

View File

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