diff --git a/ios/KataGo iOS/KataGo iOS/GobanView.swift b/ios/KataGo iOS/KataGo iOS/GobanView.swift index 9211ef25c..2362e0d5e 100644 --- a/ios/KataGo iOS/KataGo iOS/GobanView.swift +++ b/ios/KataGo iOS/KataGo iOS/GobanView.swift @@ -156,23 +156,7 @@ struct GobanItems: View { } else if isConfigPresented { ConfigView(config: gameRecord.config, isBoardSizeChanged: $isBoardSizeChanged) } else { - if hSizeClass == .compact && vSizeClass == .regular { - VStack { - BoardView(config: gameRecord.config) - HStack { - ToolbarItems(gameRecord: gameRecord) - } - .padding() - } - } else { - HStack { - BoardView(config: gameRecord.config) - VStack { - ToolbarItems(gameRecord: gameRecord) - } - .padding() - } - } + BoardView(config: gameRecord.config) } } .toolbar { @@ -182,6 +166,10 @@ struct GobanItems: View { isConfigPresented: $isConfigPresented, isBoardSizeChanged: $isBoardSizeChanged) } + + ToolbarItem(placement: .status) { + StatusToolbarItems(gameRecord: gameRecord) + } } } } diff --git a/ios/KataGo iOS/KataGo iOS/ToolbarView.swift b/ios/KataGo iOS/KataGo iOS/ToolbarView.swift index 764051187..8d305d5ff 100644 --- a/ios/KataGo iOS/KataGo iOS/ToolbarView.swift +++ b/ios/KataGo iOS/KataGo iOS/ToolbarView.swift @@ -8,62 +8,46 @@ import SwiftUI import KataGoInterface -struct ToolbarItems: View { +struct StatusToolbarItems: View { @EnvironmentObject var player: PlayerObject @EnvironmentObject var gobanState: GobanState @EnvironmentObject var board: ObservableBoard var gameRecord: GameRecord var body: some View { - Group { + HStack { Button(action: passAction) { Image(systemName: "hand.raised") - .resizable() } - .padding() Button(action: backwardAction) { Image(systemName: "backward.frame") - .resizable() } - .padding() if gobanState.analysisStatus == .pause { Button(action: startAnalysisAction) { Image(systemName: "sparkle") - .resizable() } - .padding() } else if gobanState.analysisStatus == .run { Button(action: stopAction) { Image(systemName: "sparkle") - .resizable() .symbolEffect(.variableColor.iterative.reversing, isActive: true) } - .padding() } else { Button(action: pauseAnalysisAction) { Image(systemName: "sparkle") - .resizable() .foregroundColor(.red) } - .padding() } Button(action: forwardAction) { Image(systemName: "forward.frame") - .resizable() } - .padding() Button(action: clearBoardAction) { Image(systemName: "clear") - .resizable() } - .padding() } - .scaledToFit() - .frame(maxWidth: 60) } func passAction() {