Skip to content

Windows Restore Correct Size #1788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions CodeEdit/Features/Documents/WorkspaceDocument.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,16 @@ final class WorkspaceDocument: NSDocument, ObservableObject, NSToolbarDelegate {
// SwiftUI also ignores this value, so it just manages to set the initial window size. *Hopefully* this
// is fixed in the future.
// ----
if let rectString = getFromWorkspaceState(.workspaceWindowSize) as? String {
window.setContentSize(NSRectFromString(rectString).size)
}
let windowController = CodeEditWindowController(
window: window,
workspace: self,
taskNotificationHandler: taskNotificationHandler
)

if let rectString = getFromWorkspaceState(.workspaceWindowSize) as? String {
window.setFrameOrigin(NSRectFromString(rectString).origin)
window.setFrame(NSRectFromString(rectString), display: true, animate: false)
} else {
window.setFrame(NSRect(x: 0, y: 0, width: 1400, height: 900), display: true, animate: false)
window.center()
}
self.addWindowController(windowController)
Expand Down
Loading