1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- //
- // KMBatchOperateWindowController.swift
- // PDF Master
- //
- // Created by kdanmobile on 2023/10/24.
- //
- import Cocoa
- import PDFKit
- class KMBatchOperateWindowController: KMBatchOperateBaseWindowController{
-
- static let sharedWindowController: KMBatchOperateWindowController = {
- let wc = KMBatchOperateWindowController(windowNibName: "KMBatchOperateWindowController")
- let actualWindow = wc.window as! KMBatchWindow
- actualWindow.isBatch = true
- // wc.switchToOperateType(operateType: .Convert, files: <#T##KMBatchOperateFile#>)
-
- // if IAPProductsManager.defaultManager().isAvailableAdvancedPDFToOffice {
- // wc.switchToConvertType(.WordAdvance)
- // } else {
- // wc.switchToConvertType(.WordStandard)
- // }
- wc.updateViewColor()
-
- return wc
- }()
-
- func switchToOperateType(operateType: KMBatchOperationType, files:KMBatchOperateFile) {
-
- }
-
- func updateViewColor() {
- var color = NSColor(red: 0.149, green: 0.157, blue: 0.169, alpha: 1)
- if KMAppearance.isDarkMode() {
- color = NSColor(red: 0.149, green: 0.157, blue: 0.169, alpha: 1)
- } else {
- color = NSColor(red: 0.988, green: 0.992, blue: 1.0, alpha: 1)
- }
- if let themeView = self.window?.contentView?.superview {
- for subView in themeView.subviews {
- if NSStringFromClass(type(of: subView)) == "NSTitlebarContainerView" {
- subView.layer?.backgroundColor = color.cgColor
- break
- }
- }
- }
- }
- }
|