Ariver
2026-06-29 1d03f5b6b433b062a098bf7899a349d550aafac7
C1.source/Sources/AlignerCore/Thumbnails/NativeSkeletonThumbnailProvider.swift
@@ -34,6 +34,13 @@
    }
}
public enum SkeletonThumbnailPalette {
    public static let headerAlpha: CGFloat = 0.10
    public static let contentRowAlpha: CGFloat = 0.075
    public static let accentStripeAlpha: CGFloat = 0.28
    public static let titleBandAlpha: CGFloat = 0.86
}
@MainActor
public final class NativeSkeletonThumbnailProvider: SkeletonThumbnailProviderProtocol {
    public static let defaultSize = NSSize(width: 120, height: 80)
@@ -79,7 +86,7 @@
            width: bounds.width,
            height: template.headerHeight
        )
        color(for: template.category).withAlphaComponent(0.22).setFill()
        color(for: template.category).withAlphaComponent(SkeletonThumbnailPalette.headerAlpha).setFill()
        NSBezierPath(roundedRect: header, xRadius: 6, yRadius: 6).fill()
    }
@@ -104,7 +111,7 @@
                width: maxWidth * widthRatio,
                height: rowHeight
            )
            NSColor.secondaryLabelColor.withAlphaComponent(0.18).setFill()
            NSColor.secondaryLabelColor.withAlphaComponent(SkeletonThumbnailPalette.contentRowAlpha).setFill()
            NSBezierPath(roundedRect: rect, xRadius: 3, yRadius: 3).fill()
        }
    }
@@ -120,14 +127,14 @@
                width: stripeWidth,
                height: max(4, template.headerHeight - 10)
            )
            color(for: template.category).withAlphaComponent(0.55).setFill()
            color(for: template.category).withAlphaComponent(SkeletonThumbnailPalette.accentStripeAlpha).setFill()
            NSBezierPath(roundedRect: rect, xRadius: 3, yRadius: 3).fill()
        }
    }
    private func drawTitle(_ title: String, in bounds: NSRect) {
        let titleBand = NSRect(x: 0, y: 0, width: bounds.width, height: 24)
        NSColor.windowBackgroundColor.withAlphaComponent(0.86).setFill()
        NSColor.windowBackgroundColor.withAlphaComponent(SkeletonThumbnailPalette.titleBandAlpha).setFill()
        NSBezierPath(roundedRect: titleBand, xRadius: 6, yRadius: 6).fill()
        let paragraph = NSMutableParagraphStyle()