|
|
@@ -215,19 +215,19 @@ final class DashboardView: NSView, NSTextFieldDelegate {
|
|
|
mainOverlay.translatesAutoresizingMaskIntoConstraints = false
|
|
|
mainOverlay.setContentHuggingPriority(.defaultLow, for: .vertical)
|
|
|
|
|
|
- greetingLabel.font = .systemFont(ofSize: 34, weight: .bold)
|
|
|
+ greetingLabel.font = .systemFont(ofSize: 28, weight: .bold)
|
|
|
greetingLabel.textColor = Theme.welcomeHeroHeadingBlue
|
|
|
greetingLabel.alignment = .center
|
|
|
greetingLabel.maximumNumberOfLines = 1
|
|
|
|
|
|
- subtitleLabel.font = .systemFont(ofSize: 15, weight: .regular)
|
|
|
+ subtitleLabel.font = .systemFont(ofSize: 14, weight: .regular)
|
|
|
subtitleLabel.textColor = Theme.welcomeHeroSubtitleText
|
|
|
subtitleLabel.alignment = .center
|
|
|
subtitleLabel.maximumNumberOfLines = 2
|
|
|
|
|
|
let topInset = NSView()
|
|
|
topInset.translatesAutoresizingMaskIntoConstraints = false
|
|
|
- topInset.heightAnchor.constraint(equalToConstant: 24).isActive = true
|
|
|
+ topInset.heightAnchor.constraint(equalToConstant: 12).isActive = true
|
|
|
|
|
|
configureSearchBar()
|
|
|
configureChatViews()
|
|
|
@@ -238,12 +238,13 @@ final class DashboardView: NSView, NSTextFieldDelegate {
|
|
|
|
|
|
let welcomeHeroContent = NSStackView(views: [welcomeSparkleCluster, greetingLabel, subtitleLabel])
|
|
|
welcomeHeroContent.orientation = .vertical
|
|
|
- welcomeHeroContent.spacing = 14
|
|
|
+ welcomeHeroContent.spacing = 8
|
|
|
welcomeHeroContent.alignment = .centerX
|
|
|
welcomeHeroContent.translatesAutoresizingMaskIntoConstraints = false
|
|
|
|
|
|
welcomeHeroHost.addSubview(welcomeHeroBackgroundView)
|
|
|
welcomeHeroHost.addSubview(welcomeHeroContent)
|
|
|
+ welcomeHeroHost.setContentHuggingPriority(.defaultHigh, for: .vertical)
|
|
|
NSLayoutConstraint.activate([
|
|
|
welcomeHeroBackgroundView.leadingAnchor.constraint(equalTo: welcomeHeroHost.leadingAnchor),
|
|
|
welcomeHeroBackgroundView.trailingAnchor.constraint(equalTo: welcomeHeroHost.trailingAnchor),
|
|
|
@@ -253,27 +254,28 @@ final class DashboardView: NSView, NSTextFieldDelegate {
|
|
|
welcomeHeroContent.centerXAnchor.constraint(equalTo: welcomeHeroHost.centerXAnchor),
|
|
|
welcomeHeroContent.leadingAnchor.constraint(greaterThanOrEqualTo: welcomeHeroHost.leadingAnchor, constant: 16),
|
|
|
welcomeHeroContent.trailingAnchor.constraint(lessThanOrEqualTo: welcomeHeroHost.trailingAnchor, constant: -16),
|
|
|
- welcomeHeroContent.topAnchor.constraint(equalTo: welcomeHeroHost.topAnchor, constant: 8),
|
|
|
- welcomeHeroContent.bottomAnchor.constraint(equalTo: welcomeHeroHost.bottomAnchor, constant: -4)
|
|
|
+ welcomeHeroContent.topAnchor.constraint(equalTo: welcomeHeroHost.topAnchor, constant: 4),
|
|
|
+ welcomeHeroContent.bottomAnchor.constraint(equalTo: welcomeHeroHost.bottomAnchor, constant: -2)
|
|
|
])
|
|
|
|
|
|
configureFeatureShortcutCards()
|
|
|
+ featureCardsRow.setContentHuggingPriority(.defaultHigh, for: .vertical)
|
|
|
|
|
|
let heroCardsSpacer = NSView()
|
|
|
heroCardsSpacer.translatesAutoresizingMaskIntoConstraints = false
|
|
|
- heroCardsSpacer.heightAnchor.constraint(equalToConstant: 36).isActive = true
|
|
|
+ heroCardsSpacer.heightAnchor.constraint(equalToConstant: 14).isActive = true
|
|
|
|
|
|
let midSpacer = NSView()
|
|
|
midSpacer.translatesAutoresizingMaskIntoConstraints = false
|
|
|
- midSpacer.heightAnchor.constraint(equalToConstant: 12).isActive = true
|
|
|
+ midSpacer.heightAnchor.constraint(equalToConstant: 6).isActive = true
|
|
|
|
|
|
let chatTopSpacer = NSView()
|
|
|
chatTopSpacer.translatesAutoresizingMaskIntoConstraints = false
|
|
|
- chatTopSpacer.heightAnchor.constraint(equalToConstant: 14).isActive = true
|
|
|
+ chatTopSpacer.heightAnchor.constraint(equalToConstant: 8).isActive = true
|
|
|
|
|
|
let chatBottomSpacer = NSView()
|
|
|
chatBottomSpacer.translatesAutoresizingMaskIntoConstraints = false
|
|
|
- chatBottomSpacer.heightAnchor.constraint(equalToConstant: 14).isActive = true
|
|
|
+ chatBottomSpacer.heightAnchor.constraint(equalToConstant: 8).isActive = true
|
|
|
|
|
|
mainOverlay.addArrangedSubview(topInset)
|
|
|
mainOverlay.addArrangedSubview(welcomeHeroHost)
|
|
|
@@ -378,7 +380,7 @@ final class DashboardView: NSView, NSTextFieldDelegate {
|
|
|
chatScrollView.documentView = chatDocumentView
|
|
|
chatScrollView.setContentHuggingPriority(.defaultLow, for: .vertical)
|
|
|
chatScrollView.setContentCompressionResistancePriority(.defaultLow, for: .vertical)
|
|
|
- chatScrollView.heightAnchor.constraint(greaterThanOrEqualToConstant: 320).isActive = true
|
|
|
+ chatScrollView.heightAnchor.constraint(greaterThanOrEqualToConstant: 420).isActive = true
|
|
|
// Match Saved Jobs: pin document width to the clip view so cards and bubbles track window width instead of sticking to a narrow intrinsic width.
|
|
|
NSLayoutConstraint.activate([
|
|
|
chatDocumentView.topAnchor.constraint(equalTo: chatScrollView.contentView.topAnchor),
|
|
|
@@ -2543,7 +2545,7 @@ private final class WelcomeHeroBackgroundView: NSView {
|
|
|
|
|
|
/// Circular pastel well with three sparkle symbols (reference: layered stars of different sizes).
|
|
|
private final class WelcomeSparkleClusterView: NSView {
|
|
|
- private let diameter: CGFloat = 72
|
|
|
+ private let diameter: CGFloat = 56
|
|
|
|
|
|
override var intrinsicContentSize: NSSize {
|
|
|
NSSize(width: diameter, height: diameter)
|
|
|
@@ -2560,9 +2562,9 @@ private final class WelcomeSparkleClusterView: NSView {
|
|
|
layer?.backgroundColor = iconWell.cgColor
|
|
|
|
|
|
let configs: [(CGFloat, NSFont.Weight, CGFloat, CGFloat)] = [
|
|
|
- (22, .medium, 0, 0),
|
|
|
- (14, .regular, -14, -11),
|
|
|
- (11, .regular, 15, 13)
|
|
|
+ (17, .medium, 0, 0),
|
|
|
+ (11, .regular, -11, -9),
|
|
|
+ (9, .regular, 12, 10)
|
|
|
]
|
|
|
|
|
|
let symbolName = Self.sparkleSymbolName()
|
|
|
@@ -2626,7 +2628,7 @@ private final class FeatureShortcutCardView: NSView {
|
|
|
// `#5D6D7E` — muted description.
|
|
|
let secondary = NSColor(srgbRed: 93 / 255, green: 109 / 255, blue: 126 / 255, alpha: 1)
|
|
|
|
|
|
- let iconSize: CGFloat = 48
|
|
|
+ let iconSize: CGFloat = 40
|
|
|
let iconHost = NSView()
|
|
|
iconHost.translatesAutoresizingMaskIntoConstraints = false
|
|
|
iconHost.wantsLayer = true
|
|
|
@@ -2635,7 +2637,7 @@ private final class FeatureShortcutCardView: NSView {
|
|
|
|
|
|
let icon = NSImageView()
|
|
|
icon.translatesAutoresizingMaskIntoConstraints = false
|
|
|
- icon.symbolConfiguration = NSImage.SymbolConfiguration(pointSize: 18, weight: .regular)
|
|
|
+ icon.symbolConfiguration = NSImage.SymbolConfiguration(pointSize: 16, weight: .regular)
|
|
|
icon.image = NSImage(systemSymbolName: symbolName, accessibilityDescription: nil)
|
|
|
icon.contentTintColor = primaryBlue
|
|
|
iconHost.addSubview(icon)
|
|
|
@@ -2695,7 +2697,7 @@ private final class FeatureShortcutCardView: NSView {
|
|
|
row.translatesAutoresizingMaskIntoConstraints = false
|
|
|
addSubview(row)
|
|
|
|
|
|
- let inset: CGFloat = 22
|
|
|
+ let inset: CGFloat = 16
|
|
|
NSLayoutConstraint.activate([
|
|
|
row.leadingAnchor.constraint(equalTo: leadingAnchor, constant: inset),
|
|
|
row.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -inset),
|