style: tighten emoji grid spacing

This commit is contained in:
2026-10-17 01:47:50 +02:00
parent f9644d4afd
commit 378cad4bf1
3 changed files with 33 additions and 4 deletions
+3 -3
View File
@@ -38,8 +38,8 @@ final class EmojiPickerController: NSViewController, NSCollectionViewDataSource,
category.action = #selector(categoryChanged)
let layout = NSCollectionViewFlowLayout()
layout.itemSize = NSSize(width: 64, height: 64)
layout.minimumInteritemSpacing = 6
layout.minimumLineSpacing = 6
layout.minimumInteritemSpacing = 1
layout.minimumLineSpacing = 1
layout.sectionInset = NSEdgeInsets(top: LauncherScrollView.fadeHeight, left: 16, bottom: 12, right: 16)
collection.collectionViewLayout = layout
collection.backgroundColors = [.clear]
@@ -149,7 +149,7 @@ final class EmojiPickerController: NSViewController, NSCollectionViewDataSource,
collection.scrollToItems(at: [indexPath(for: selected)], scrollPosition: .nearestHorizontalEdge)
}
private var columns: Int { max(1, Int((collection.bounds.width - 32 + 6) / 70)) }
private var columns: Int { max(1, Int((collection.bounds.width - 32 + 1) / 65)) }
private func indexPath(for index: Int) -> IndexPath {
splitFavorites && index >= favoriteCount