File tree Expand file tree Collapse file tree 2 files changed +25
-10
lines changed
Examples/Sources/CounterExample
Sources/SwiftCrossUI/Views Expand file tree Collapse file tree 2 files changed +25
-10
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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,
You can’t perform that action at this time.
0 commit comments