Skip to content

Commit 6937f55

Browse files
committed
Fix AppKitBackend post-rebase and revert CounterApp
1 parent da0706f commit 6937f55

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

Examples/Sources/CounterExample/CounterApp.swift

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,16 @@ struct CounterApp: App {
1313
var body: some Scene {
1414
WindowGroup("CounterExample: \(count)") {
1515
#hotReloadable {
16-
VStack(alignment: .leading, spacing: 1) {
17-
ForEach(Font.TextStyle.allCases) { style in
18-
Text("This is \(style)")
19-
.font(.system(style))
16+
HStack(spacing: 20) {
17+
Button("-") {
18+
count -= 1
19+
}
20+
Text("Count: \(count)")
21+
Button("+") {
22+
count += 1
2023
}
2124
}
22-
// VStack(alignment: .leading, spacing: 1) {
23-
// ForEach(Font.Weight.allCases) { weight in
24-
// Text("This is \(weight) text")
25-
// .fontWeight(weight)
26-
// }
27-
// }
25+
.padding()
2826
}
2927
}
3028
.defaultSize(width: 400, height: 200)

Sources/AppKitBackend/AppKitBackend.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ public final class AppKitBackend: AppBackend {
673673
textField.isEnabled = environment.isEnabled
674674
textField.placeholderString = placeholder
675675
textField.appearance = environment.colorScheme.nsAppearance
676-
textField.font = Self.font(for: environment)
676+
textField.font = Self.font(for: environment.resolvedFont)
677677
textField.onEdit = { textField in
678678
onChange(textField.stringValue)
679679
}

0 commit comments

Comments
 (0)