File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed
Cookbook/CookbookCommon/Sources/CookbookCommon/Recipes/MiniApps Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -45,17 +45,23 @@ struct InstrumentSFZView: View {
4545
4646 GeometryReader { geoProxy in
4747 VStack {
48- ScrollView {
49- ForEach ( 0 ..< instrumentParamsChunked. count, id: \. self) { chunkIndex in
50- HStack {
51- ForEach ( instrumentParamsChunked [ chunkIndex] , id: \. self) { param in
52- ParameterRow ( param: param)
53- }
54- } . padding ( 5 )
48+ let paramRows = ForEach ( 0 ..< instrumentParamsChunked. count, id: \. self) { chunkIndex in
49+ HStack {
50+ ForEach ( instrumentParamsChunked [ chunkIndex] , id: \. self) { param in
51+ ParameterRow ( param: param)
52+ }
53+ } . padding ( 5 )
54+ }
55+ // i wanted to do it with verticalSizeClass, but couldn't work it out
56+ if horizontalSizeClass == . compact {
57+ ScrollView {
58+ paramRows
5559 }
60+ } else {
61+ paramRows
5662 }
5763 CookbookKeyboard ( noteOn: conductor. noteOn,
58- noteOff: conductor. noteOff) . frame ( height: geoProxy. size. height / 4 )
64+ noteOff: conductor. noteOff) . frame ( height: geoProxy. size. height / 5 )
5965 }
6066 }
6167 . cookbookNavBarTitle ( " Instrument SFZ " )
You can’t perform that action at this time.
0 commit comments