Skip to content

Commit 33d1f41

Browse files
committed
Checkpoint. Fix correctness next
1 parent 3b77ec2 commit 33d1f41

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed

Examples/Sources/CounterExample/CounterApp.swift

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,32 @@ struct CounterApp: App {
1212

1313
var body: some Scene {
1414
WindowGroup("CounterExample: \(count)") {
15-
#hotReloadable {
16-
HStack(spacing: 20) {
17-
Button("-") {
18-
count -= 1
19-
}
20-
Text("Count: \(count)")
21-
Button("+") {
22-
count += 1
15+
VStack {
16+
// ScrollView {
17+
HStack {
18+
Color.orange.frame(width: 5)
19+
20+
Text("Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.")
21+
// .padding()
2322
}
24-
}
25-
.padding()
23+
.background(Color.gray)
24+
.fixedSize(horizontal: false, vertical: true)
25+
// }
2626
}
27+
// #hotReloadable {
28+
// VStack {
29+
// HStack(spacing: 20) {
30+
// Button("-") {
31+
// count -= 1
32+
// }
33+
// Text("Count: \(count)")
34+
// Button("+") {
35+
// count += 1
36+
// }
37+
// }
38+
// .padding()
39+
// }
40+
// }
2741
}
2842
.defaultSize(width: 400, height: 200)
2943
}

Sources/SwiftCrossUI/Views/Text.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ extension Text: ElementaryView {
6565
environment: environment
6666
).y
6767
} else if let proposedWidth = proposedSize.width {
68+
print(proposedWidth)
6869
size = backend.size(
6970
of: string,
7071
whenDisplayedIn: widget,

0 commit comments

Comments
 (0)