Skip to content

Commit e27dca6

Browse files
committed
Default size for Auth & MatchMaking
1 parent 02f4d5b commit e27dca6

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Examples/GKMatchMaker/Shared/Views/Authentication/AuthenticationView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ struct AuthenticationView: View {
5959
self.viewModel.showModal = false
6060
self.viewModel.currentState = "Hello \(player.displayName)"
6161
}
62-
.frame(minWidth: 800, maxWidth: .infinity, minHeight: 500, maxHeight: .infinity)
62+
.frame(width: 640, height: 480)
6363
}
6464
.alert(isPresented: self.$viewModel.showAlert) {
6565
Alert(title: Text(self.viewModel.alertTitle),

Examples/GKMatchMaker/Shared/Views/MultiPlayer/MatchMakingView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ struct MatchMakingView: View {
6464
} started: { (match) in
6565
self.viewModel.showModal = false
6666
}
67+
.frame(width: 640, height: 480)
6768
}
6869
.alert(isPresented: self.$viewModel.showAlert) {
6970
Alert(title: Text(self.viewModel.alertTitle),

Examples/GKMatchMaker/macOS/Views/ContentView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ struct ContentView: View {
3131

3232
var body: some View {
3333
SidebarView()
34-
.frame(minWidth: 800, maxWidth: .infinity, minHeight: 500, maxHeight: .infinity)
34+
.frame(minWidth: 800, maxWidth: .infinity, minHeight: 600, maxHeight: .infinity)
3535
}
3636
}
3737

Sources/GameKitUI/macOS/Matchmaker/MatchmakerViewController+macOS.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class MatchmakerViewController: NSViewController, GKMatchDelegate, GKLoca
3838
private let failed: (Error) -> Void
3939
private let started: (GKMatch) -> Void
4040
private var cancellable: AnyCancellable?
41-
private let _loadingViewController = LoadingViewController()
41+
private let loadingViewController = LoadingViewController()
4242

4343
@available(macOS 11.0, *)
4444
public init(matchRequest: GKMatchRequest,
@@ -71,8 +71,7 @@ public class MatchmakerViewController: NSViewController, GKMatchDelegate, GKLoca
7171

7272
public override func loadView() {
7373
self.view = NSView()
74-
view.wantsLayer = true
75-
view.layer?.backgroundColor = NSColor.blue.cgColor
74+
self.view.setBoundsSize(NSSize(width: 800, height: 600))
7675
}
7776

7877
public func subscribe() {
@@ -104,7 +103,7 @@ public class MatchmakerViewController: NSViewController, GKMatchDelegate, GKLoca
104103

105104
public override func viewWillAppear() {
106105
super.viewWillAppear()
107-
self.add(_loadingViewController)
106+
self.add(loadingViewController)
108107
if GKLocalPlayer.local.isAuthenticated {
109108
self.showMatchmakerViewController()
110109
} else {

0 commit comments

Comments
 (0)