Minimum frames (#69)
This commit is contained in:
parent
2e9a3eb90d
commit
0a9ecb039e
|
@ -66,7 +66,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|||
|
||||
@IBAction func runSetup(sender: AnyObject?) {
|
||||
let setupWindow = NSWindow(
|
||||
contentRect: NSRect(x: 0, y: 0, width: 00, height: 00),
|
||||
contentRect: NSRect(x: 0, y: 0, width: 0, height: 0),
|
||||
styleMask: [.titled, .closable, .miniaturizable, .resizable, .fullSizeContentView],
|
||||
backing: .buffered, defer: false)
|
||||
let setupView = SetupView() { success in
|
||||
|
@ -74,7 +74,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|||
self.agentStatusChecker.check()
|
||||
}
|
||||
setupWindow.contentView = NSHostingView(rootView: setupView)
|
||||
setupWindow.setContentSize(setupWindow.contentView!.fittingSize)
|
||||
window.beginSheet(setupWindow, completionHandler: nil)
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ struct ContentView<UpdaterType: UpdaterProtocol, AgentStatusCheckerType: AgentSt
|
|||
} else {
|
||||
NoStoresView()
|
||||
}
|
||||
}
|
||||
}.frame(minWidth: 640, minHeight: 320)
|
||||
}
|
||||
|
||||
func updateNotice() -> some View {
|
||||
|
|
|
@ -27,7 +27,7 @@ struct SetupView: View {
|
|||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
}.frame(minWidth: 640, minHeight: 400)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -64,10 +64,8 @@ struct SetupStepView<NestedViewType: View>: View {
|
|||
Text(text)
|
||||
.opacity(completed ? 0.5 : 1)
|
||||
.lineLimit(nil)
|
||||
.frame(idealHeight: 0, maxHeight: .infinity)
|
||||
if nestedView != nil {
|
||||
Spacer()
|
||||
nestedView!
|
||||
nestedView!.padding()
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
|
@ -92,6 +90,7 @@ struct SetupStepCommandView: View {
|
|||
.lineLimit(nil)
|
||||
.font(.system(.caption, design: .monospaced))
|
||||
.multilineTextAlignment(.leading)
|
||||
.frame(minHeight: 50)
|
||||
HStack {
|
||||
Spacer()
|
||||
Button(action: copy) {
|
||||
|
|
Loading…
Reference in New Issue