|
|
@@ -2540,12 +2540,19 @@ private extension ViewController {
|
|
2540
|
2540
|
iconWrap.widthAnchor.constraint(equalToConstant: 58).isActive = true
|
|
2541
|
2541
|
iconWrap.heightAnchor.constraint(equalToConstant: 58).isActive = true
|
|
2542
|
2542
|
iconWrap.layer?.borderWidth = 0
|
|
2543
|
|
- let classSymbol = NSImage(systemSymbolName: "graduationcap.circle.fill", accessibilityDescription: "Google Classroom") ?? NSImage()
|
|
2544
|
|
- let classLogo = NSImageView(image: classSymbol)
|
|
|
2543
|
+ let usesClassroomAsset = NSImage(named: "icon_google_classroom") != nil
|
|
|
2544
|
+ let classLogoImage =
|
|
|
2545
|
+ NSImage(named: "icon_google_classroom")
|
|
|
2546
|
+ ?? NSImage(systemSymbolName: "graduationcap.circle.fill", accessibilityDescription: "Google Classroom")
|
|
|
2547
|
+ ?? NSImage()
|
|
|
2548
|
+ classLogoImage.isTemplate = false
|
|
|
2549
|
+ let classLogo = NSImageView(image: classLogoImage)
|
|
2545
|
2550
|
classLogo.translatesAutoresizingMaskIntoConstraints = false
|
|
2546
|
2551
|
classLogo.imageScaling = .scaleProportionallyDown
|
|
2547
|
2552
|
classLogo.symbolConfiguration = NSImage.SymbolConfiguration(pointSize: 28, weight: .medium)
|
|
2548
|
|
- classLogo.contentTintColor = palette.primaryBlue
|
|
|
2553
|
+ if !usesClassroomAsset {
|
|
|
2554
|
+ classLogo.contentTintColor = palette.primaryBlue
|
|
|
2555
|
+ }
|
|
2549
|
2556
|
iconWrap.addSubview(classLogo)
|
|
2550
|
2557
|
|
|
2551
|
2558
|
let instantTitle = textLabel("Open Classroom", font: NSFont.systemFont(ofSize: 40 / 2, weight: .semibold), color: palette.textPrimary)
|
|
|
@@ -2605,15 +2612,19 @@ private extension ViewController {
|
|
2605
|
2612
|
])
|
|
2606
|
2613
|
|
|
2607
|
2614
|
let baseColor = palette.sectionCard
|
|
2608
|
|
- let hoverBlend = darkModeEnabled ? NSColor.white : NSColor.black
|
|
2609
|
|
- let hoverColor = baseColor.blended(withFraction: 0.10, of: hoverBlend) ?? baseColor
|
|
|
2615
|
+ let baseBorderColor = palette.inputBorder
|
|
|
2616
|
+ let classroomHoverTint = NSColor(calibratedRed: 0.46, green: 0.80, blue: 0.42, alpha: 1.0)
|
|
|
2617
|
+ let hoverColor = baseColor.blended(withFraction: darkModeEnabled ? 0.24 : 0.16, of: classroomHoverTint) ?? baseColor
|
|
|
2618
|
+ let hoverBorderColor = baseBorderColor.blended(withFraction: darkModeEnabled ? 0.45 : 0.32, of: classroomHoverTint) ?? baseBorderColor
|
|
2610
|
2619
|
instant.onHoverChanged = { [weak self] hovering in
|
|
2611
|
2620
|
guard let self else { return }
|
|
2612
|
2621
|
instant.layer?.backgroundColor = (hovering ? hoverColor : baseColor).cgColor
|
|
|
2622
|
+ instant.layer?.borderColor = (hovering ? hoverBorderColor : baseBorderColor).cgColor
|
|
2613
|
2623
|
}
|
|
2614
|
2624
|
codeCard.onHoverChanged = { [weak self] hovering in
|
|
2615
|
2625
|
guard let self else { return }
|
|
2616
|
2626
|
codeCard.layer?.backgroundColor = (hovering ? hoverColor : baseColor).cgColor
|
|
|
2627
|
+ codeCard.layer?.borderColor = (hovering ? hoverBorderColor : baseBorderColor).cgColor
|
|
2617
|
2628
|
}
|
|
2618
|
2629
|
instant.onHoverChanged?(false)
|
|
2619
|
2630
|
codeCard.onHoverChanged?(false)
|
|
|
@@ -4068,7 +4079,7 @@ private extension ViewController {
|
|
4068
|
4079
|
}
|
|
4069
|
4080
|
|
|
4070
|
4081
|
private func makeScheduleScrollButton(systemSymbol: String, action: Selector) -> NSButton {
|
|
4071
|
|
- let button = NSButton(title: "", target: self, action: action)
|
|
|
4082
|
+ let button = HoverButton(title: "", target: self, action: action)
|
|
4072
|
4083
|
button.translatesAutoresizingMaskIntoConstraints = false
|
|
4073
|
4084
|
button.isBordered = false
|
|
4074
|
4085
|
button.bezelStyle = .regularSquare
|
|
|
@@ -4085,6 +4096,16 @@ private extension ViewController {
|
|
4085
|
4096
|
button.focusRingType = .none
|
|
4086
|
4097
|
button.heightAnchor.constraint(equalToConstant: 32).isActive = true
|
|
4087
|
4098
|
button.widthAnchor.constraint(equalToConstant: 32).isActive = true
|
|
|
4099
|
+ let baseColor = palette.inputBackground
|
|
|
4100
|
+ let baseBorder = palette.inputBorder
|
|
|
4101
|
+ let hoverBlend = darkModeEnabled ? NSColor.white : NSColor.black
|
|
|
4102
|
+ let hoverColor = baseColor.blended(withFraction: 0.10, of: hoverBlend) ?? baseColor
|
|
|
4103
|
+ let hoverBorder = baseBorder.blended(withFraction: 0.16, of: hoverBlend) ?? baseBorder
|
|
|
4104
|
+ button.onHoverChanged = { [weak button] hovering in
|
|
|
4105
|
+ button?.layer?.backgroundColor = (hovering ? hoverColor : baseColor).cgColor
|
|
|
4106
|
+ button?.layer?.borderColor = (hovering ? hoverBorder : baseBorder).cgColor
|
|
|
4107
|
+ }
|
|
|
4108
|
+ button.onHoverChanged?(false)
|
|
4088
|
4109
|
return button
|
|
4089
|
4110
|
}
|
|
4090
|
4111
|
}
|