refactor: unify custom shortcut indicators across the app
This commit is contained in:
@@ -118,9 +118,8 @@ final class UninstallReviewController: NSViewController, NSSearchFieldDelegate,
|
||||
pill.layer?.borderWidth = 0.5
|
||||
pill.layer?.borderColor = SunsetPalette.accent.withAlphaComponent(0.35).cgColor
|
||||
pill.layer?.backgroundColor = SunsetPalette.accent.withAlphaComponent(0.08).cgColor
|
||||
let commandKey = shortcutBadge("⌘")
|
||||
let returnKey = shortcutBadge("↵")
|
||||
for child in [remove, commandKey, returnKey] {
|
||||
let shortcut = ShortcutIndicator("⌘", "↵")
|
||||
for child in [remove, shortcut] {
|
||||
child.translatesAutoresizingMaskIntoConstraints = false
|
||||
pill.addSubview(child)
|
||||
}
|
||||
@@ -128,11 +127,9 @@ final class UninstallReviewController: NSViewController, NSSearchFieldDelegate,
|
||||
pill.heightAnchor.constraint(equalToConstant: 36),
|
||||
remove.leadingAnchor.constraint(equalTo: pill.leadingAnchor, constant: 14),
|
||||
remove.centerYAnchor.constraint(equalTo: pill.centerYAnchor),
|
||||
commandKey.leadingAnchor.constraint(equalTo: remove.trailingAnchor, constant: 8),
|
||||
commandKey.centerYAnchor.constraint(equalTo: pill.centerYAnchor),
|
||||
returnKey.leadingAnchor.constraint(equalTo: commandKey.trailingAnchor, constant: 2),
|
||||
returnKey.centerYAnchor.constraint(equalTo: pill.centerYAnchor),
|
||||
returnKey.trailingAnchor.constraint(equalTo: pill.trailingAnchor, constant: -12)
|
||||
shortcut.leadingAnchor.constraint(equalTo: remove.trailingAnchor, constant: 8),
|
||||
shortcut.centerYAnchor.constraint(equalTo: pill.centerYAnchor),
|
||||
shortcut.trailingAnchor.constraint(equalTo: pill.trailingAnchor, constant: -12)
|
||||
])
|
||||
let footer = NSStackView(views: [NSView(), pill])
|
||||
footer.orientation = .horizontal
|
||||
|
||||
Reference in New Issue
Block a user