|
|
@@ -934,7 +934,7 @@ class ViewController: NSViewController {
|
|
934
|
934
|
makeActionTile(title: "Schedule", symbol: "calendar", color: accentBlue, action: #selector(scheduleMeetingWebTapped))
|
|
935
|
935
|
])
|
|
936
|
936
|
actions.orientation = .horizontal
|
|
937
|
|
- actions.spacing = 16
|
|
|
937
|
+ actions.spacing = 12
|
|
938
|
938
|
actions.alignment = .centerY
|
|
939
|
939
|
actions.distribution = .fillEqually
|
|
940
|
940
|
|
|
|
@@ -1284,21 +1284,25 @@ class ViewController: NSViewController {
|
|
1284
|
1284
|
private func makeActionTile(title: String, symbol: String, color: NSColor, action: Selector? = nil) -> NSView {
|
|
1285
|
1285
|
let root = NSView()
|
|
1286
|
1286
|
root.translatesAutoresizingMaskIntoConstraints = false
|
|
1287
|
|
- root.widthAnchor.constraint(equalToConstant: 104).isActive = true
|
|
1288
|
|
- root.heightAnchor.constraint(equalToConstant: 100).isActive = true
|
|
|
1287
|
+ root.widthAnchor.constraint(equalToConstant: 88).isActive = true
|
|
|
1288
|
+ root.heightAnchor.constraint(equalToConstant: 70).isActive = true
|
|
1289
|
1289
|
|
|
1290
|
1290
|
let iconButton = NSButton(title: "", target: action == nil ? nil : self, action: action)
|
|
1291
|
1291
|
iconButton.isBordered = false
|
|
1292
|
1292
|
iconButton.wantsLayer = true
|
|
1293
|
1293
|
iconButton.layer?.backgroundColor = color.cgColor
|
|
1294
|
|
- iconButton.layer?.cornerRadius = 20
|
|
|
1294
|
+ iconButton.layer?.cornerRadius = 15
|
|
1295
|
1295
|
iconButton.layer?.shadowOpacity = 0.2
|
|
1296
|
1296
|
iconButton.layer?.shadowRadius = 7
|
|
1297
|
1297
|
iconButton.layer?.shadowOffset = NSSize(width: 0, height: -1)
|
|
1298
|
|
- iconButton.image = NSImage(systemSymbolName: symbol, accessibilityDescription: title)
|
|
|
1298
|
+ let symbolConfig = NSImage.SymbolConfiguration(pointSize: 22, weight: .semibold)
|
|
|
1299
|
+ if let baseImage = NSImage(systemSymbolName: symbol, accessibilityDescription: title),
|
|
|
1300
|
+ let configured = baseImage.withSymbolConfiguration(symbolConfig) {
|
|
|
1301
|
+ iconButton.image = configured
|
|
|
1302
|
+ }
|
|
1299
|
1303
|
iconButton.contentTintColor = .white
|
|
1300
|
|
- iconButton.imageScaling = .scaleProportionallyUpOrDown
|
|
1301
|
|
- let label = makeLabel(title, size: 14, color: secondaryText, weight: .regular, centered: true)
|
|
|
1304
|
+ iconButton.imageScaling = .scaleNone
|
|
|
1305
|
+ let label = makeLabel(title, size: 12, color: secondaryText, weight: .regular, centered: true)
|
|
1302
|
1306
|
|
|
1303
|
1307
|
[iconButton, label].forEach {
|
|
1304
|
1308
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
|
|
@@ -1307,9 +1311,9 @@ class ViewController: NSViewController {
|
|
1307
|
1311
|
NSLayoutConstraint.activate([
|
|
1308
|
1312
|
iconButton.topAnchor.constraint(equalTo: root.topAnchor),
|
|
1309
|
1313
|
iconButton.centerXAnchor.constraint(equalTo: root.centerXAnchor),
|
|
1310
|
|
- iconButton.widthAnchor.constraint(equalToConstant: 64),
|
|
1311
|
|
- iconButton.heightAnchor.constraint(equalToConstant: 64),
|
|
1312
|
|
- label.topAnchor.constraint(equalTo: iconButton.bottomAnchor, constant: 10),
|
|
|
1314
|
+ iconButton.widthAnchor.constraint(equalToConstant: 50),
|
|
|
1315
|
+ iconButton.heightAnchor.constraint(equalToConstant: 50),
|
|
|
1316
|
+ label.topAnchor.constraint(equalTo: iconButton.bottomAnchor, constant: 8),
|
|
1313
|
1317
|
label.centerXAnchor.constraint(equalTo: root.centerXAnchor),
|
|
1314
|
1318
|
label.bottomAnchor.constraint(equalTo: root.bottomAnchor)
|
|
1315
|
1319
|
])
|