feat: separate favorite application suggestions

This commit is contained in:
Valdemar Lorenzen
2026-10-14 12:03:36 +02:00
parent fd010ac864
commit 3fd9519169
5 changed files with 47 additions and 8 deletions
@@ -0,0 +1,18 @@
import AppKit
import Testing
@testable import Conjure
@Test @MainActor
func favoriteSpacingLeavesApplicationContentAtNormalHeightAndResetsOnReuse() {
_ = NSApplication.shared
let row = LauncherRowView(frame: NSRect(x: 0, y: 0, width: 650, height: 50))
let cell = ApplicationCell(frame: row.bounds)
row.addSubview(cell)
row.topSpacing = 12
row.layoutSubtreeIfNeeded()
#expect(cell.frame == NSRect(x: 0, y: 12, width: 650, height: 38))
row.frame.size.height = 38
row.topSpacing = 0
row.layoutSubtreeIfNeeded()
#expect(cell.frame == NSRect(x: 0, y: 0, width: 650, height: 38))
}