Skip to content

Commit

Permalink
Merge pull request #83 from 42Box/cluster_develop
Browse files Browse the repository at this point in the history
Merge: Second Week Release
  • Loading branch information
chanhihi authored Aug 27, 2023
2 parents 24cc8dc + e860578 commit 5d0bf6b
Show file tree
Hide file tree
Showing 109 changed files with 2,681 additions and 739 deletions.
229 changes: 200 additions & 29 deletions Box42.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

129 changes: 0 additions & 129 deletions Box42/Box/BoxBaseContainerViewController.swift

This file was deleted.

92 changes: 0 additions & 92 deletions Box42/Box/View/BoxButtonViewGroup.swift

This file was deleted.

44 changes: 44 additions & 0 deletions Box42/BoxWindowController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//
// BoxWindowController.swift
// Box42
//
// Created by Chanhee Kim on 8/11/23.
//

import Cocoa

class BoxWindowController: NSWindowController, NSWindowDelegate {
override init(window: NSWindow?) {
let contentRect = BoxSizeManager.shared.boxViewSizeNSRect
let styleMask: NSWindow.StyleMask = [.resizable, .titled, .fullSizeContentView]
let windowInstance = NSWindow(contentRect: contentRect, styleMask: styleMask, backing: .buffered, defer: false)
super.init(window: windowInstance)
windowInstance.delegate = self

windowInstance.title = "Box"
windowInstance.titlebarAppearsTransparent = true
windowInstance.titleVisibility = .hidden
windowInstance.isMovableByWindowBackground = true
windowInstance.isReleasedWhenClosed = false
windowInstance.standardWindowButton(.closeButton)?.isHidden = true
windowInstance.standardWindowButton(.miniaturizeButton)?.isHidden = true
windowInstance.standardWindowButton(.zoomButton)?.isHidden = true

let boxViewController = BoxBaseContainerViewController(nibName: nil, bundle: nil)
windowInstance.contentViewController = boxViewController
}

required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}

extension BoxWindowController {
func windowWillClose(_ notification: Notification) {
StateManager.shared.showWindow = false
}

func windowWillMiniaturize(_ notification: Notification) {
StateManager.shared.showWindow = false
}
}
Loading

0 comments on commit 5d0bf6b

Please sign in to comment.