feat: configure launcher color scheme
This commit is contained in:
@@ -38,7 +38,7 @@ final class EmojiPickerController: NSViewController, NSCollectionViewDataSource,
|
||||
category.action = #selector(categoryChanged)
|
||||
category.font = .systemFont(ofSize: 12)
|
||||
category.isBordered = false
|
||||
category.contentTintColor = SunsetPalette.secondaryText
|
||||
category.contentTintColor = ThemePalette.secondaryText
|
||||
category.setContentCompressionResistancePriority(.required, for: .horizontal)
|
||||
layout.itemSize = NSSize(width: 80, height: 80)
|
||||
layout.minimumInteritemSpacing = 8
|
||||
@@ -59,9 +59,9 @@ final class EmojiPickerController: NSViewController, NSCollectionViewDataSource,
|
||||
scroll.scrollerStyle = .overlay
|
||||
scroll.drawsBackground = false
|
||||
scroll.contentView.drawsBackground = false
|
||||
empty.textColor = SunsetPalette.secondaryText
|
||||
empty.textColor = ThemePalette.secondaryText
|
||||
status.font = .systemFont(ofSize: 12)
|
||||
status.textColor = SunsetPalette.secondaryText
|
||||
status.textColor = ThemePalette.secondaryText
|
||||
status.lineBreakMode = .byTruncatingTail
|
||||
status.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
|
||||
copyButton.target = self
|
||||
@@ -323,10 +323,10 @@ private final class EmojiSectionHeader: NSView {
|
||||
|
||||
func setTitle(_ title: String, count: Int) {
|
||||
let text = NSMutableAttributedString(string: title, attributes: [
|
||||
.font: NSFont.systemFont(ofSize: 13), .foregroundColor: SunsetPalette.secondaryText,
|
||||
.font: NSFont.systemFont(ofSize: 13), .foregroundColor: ThemePalette.secondaryText,
|
||||
])
|
||||
text.append(NSAttributedString(string: " \(count)", attributes: [
|
||||
.font: NSFont.systemFont(ofSize: 12), .foregroundColor: SunsetPalette.secondaryText.withAlphaComponent(0.55),
|
||||
.font: NSFont.systemFont(ofSize: 12), .foregroundColor: ThemePalette.secondaryText.withAlphaComponent(0.55),
|
||||
]))
|
||||
label.attributedStringValue = text
|
||||
}
|
||||
@@ -348,7 +348,7 @@ private final class EmojiItem: NSCollectionViewItem {
|
||||
}
|
||||
|
||||
func highlight(_ selected: Bool) {
|
||||
button.layer?.backgroundColor = (selected ? SunsetPalette.selectionFill : SunsetPalette.text.withAlphaComponent(0.045)).cgColor
|
||||
button.layer?.backgroundColor = (selected ? ThemePalette.selectionFill : ThemePalette.text.withAlphaComponent(0.045)).cgColor
|
||||
button.setAccessibilitySelected(selected)
|
||||
button.selected = selected
|
||||
}
|
||||
@@ -378,7 +378,7 @@ private final class EmojiButton: NSButton {
|
||||
|
||||
private func updateBorder() {
|
||||
layer?.borderWidth = selected || hovered ? 0.5 : 0
|
||||
layer?.borderColor = (selected ? SunsetPalette.accent.withAlphaComponent(0.8)
|
||||
: SunsetPalette.secondaryText.withAlphaComponent(0.35)).cgColor
|
||||
layer?.borderColor = (selected ? ThemePalette.accent.withAlphaComponent(0.8)
|
||||
: ThemePalette.secondaryText.withAlphaComponent(0.35)).cgColor
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user