|
@@ -29,32 +29,6 @@ import Cocoa
|
|
|
rightTabStripView_.updateView()
|
|
|
fileUploadPanel.delete = self
|
|
|
homeRightTabStripView_.homeRightSearchField.delegate = self
|
|
|
-// if let data = self.window?.standardWindowButton(.miniaturizeButton) {
|
|
|
-//// data.isHidden = true
|
|
|
-// data.frame = NSMakeRect(48, 128, 14, 16)
|
|
|
-// }
|
|
|
-// if let data = self.window?.standardWindowButton(.closeButton) {
|
|
|
-//// data.isHidden = true
|
|
|
-// }
|
|
|
-// if let data = self.window?.standardWindowButton(.zoomButton) {
|
|
|
-//// data.isHidden = true
|
|
|
-//
|
|
|
-// let view = NSView()
|
|
|
-// self.window?.contentView?.superview?.addSubview(view)
|
|
|
-// view.km_add_left_constraint()
|
|
|
-// view.km_add_top_constraint()
|
|
|
-// view.km_add_size_constraint(size: NSMakeSize(70, 40))
|
|
|
-//// view.wantsLayer = true
|
|
|
-//// view.layer?.backgroundColor = NSColor(red: 1, green: 0, blue: 0, alpha: 0.5).cgColor
|
|
|
-//
|
|
|
-// let close = NSWindow.standardWindowButton(.closeButton, for: .closable)
|
|
|
-// view.addSubview(close!)
|
|
|
-// close?.km_add_centerY_constraint()
|
|
|
-// close?.km_add_left_constraint(constant: 10)
|
|
|
-// close?.target = self
|
|
|
-// close?.action = #selector(closeAction)
|
|
|
-// close?.needsDisplay = true
|
|
|
-// }
|
|
|
|
|
|
isMultiTabMode = true
|
|
|
addObserverForAppearanceChange()
|
|
@@ -102,6 +76,20 @@ import Cocoa
|
|
|
return true
|
|
|
}
|
|
|
|
|
|
+ override func layoutSubviews() {
|
|
|
+ super.layoutSubviews()
|
|
|
+
|
|
|
+ if let button = (self.window as? CTBrowserWindow)?.standardWindowButton(.closeButton) {
|
|
|
+ button.frame = NSMakeRect(button.frame.minX, 0, button.frame.width, button.frame.height)
|
|
|
+ }
|
|
|
+ if let button = (self.window as? CTBrowserWindow)?.standardWindowButton(.zoomButton) {
|
|
|
+ button.frame = NSMakeRect(button.frame.minX, 0, button.frame.width, button.frame.height)
|
|
|
+ }
|
|
|
+ if let button = (self.window as? CTBrowserWindow)?.standardWindowButton(.miniaturizeButton) {
|
|
|
+ button.frame = NSMakeRect(button.frame.minX, 0, button.frame.width, button.frame.height)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// MARK: Dark&Light
|
|
|
|
|
|
func addObserverForAppearanceChange() -> Void {
|