File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Examples/Sources/ControlsExample
Sources/SwiftCrossUI/Views Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,6 @@ struct ControlsApp: App {
9090 Toggle ( enabled ? " Disable all " : " Enable all " , active: $enabled)
9191 . padding ( )
9292 }
93-
9493 } . defaultSize ( width: 400 , height: 600 )
9594 }
9695}
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ public struct ProgressView<Label: View>: View {
5353 }
5454
5555 /// Makes the ProgressView resize to fit the available space.
56- /// Only affects `Kind. spinner`.
56+ /// Only affects `` Kind/ spinner` `.
5757 public func resizable( _ isResizable: Bool = true ) -> Self {
5858 var progressView = self
5959 progressView. isSpinnerResizable = isResizable
@@ -111,6 +111,7 @@ extension ProgressView where Label == Text {
111111
112112struct ProgressSpinnerView : ElementaryView {
113113 let isResizable : Bool
114+
114115 init ( isResizable: Bool = false ) {
115116 self . isResizable = isResizable
116117 }
@@ -133,10 +134,10 @@ struct ProgressSpinnerView: ElementaryView {
133134 backend. setSize ( of: widget, to: naturalSize)
134135 return ViewUpdateResult . leafView ( size: ViewSize ( fixedSize: naturalSize) )
135136 }
136- let min = max ( min ( proposedSize. x, proposedSize. y) , 10 )
137+ let minimumDimension = max ( min ( proposedSize. x, proposedSize. y) , 10 )
137138 let size = SIMD2 (
138- min ,
139- min
139+ minimumDimension ,
140+ minimumDimension
140141 )
141142 if !dryRun {
142143 // Doesn't change the rendered size of ProgressSpinner
@@ -148,8 +149,8 @@ struct ProgressSpinnerView: ElementaryView {
148149 size: ViewSize (
149150 size: size,
150151 idealSize: naturalSize,
151- minimumWidth: 10 ,
152- minimumHeight: 10 ,
152+ minimumWidth: 0 ,
153+ minimumHeight: 0 ,
153154 maximumWidth: nil ,
154155 maximumHeight: nil
155156 )
You can’t perform that action at this time.
0 commit comments