|
@@ -37,9 +37,7 @@ extension KMMainViewController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
func numberOfChars(_ str: String) -> (num: Int, indexN: Int) {
|
|
|
var number = 0
|
|
|
var indexN = 0
|
|
@@ -84,14 +82,7 @@ extension KMMainViewController {
|
|
|
}
|
|
|
return isFull
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- func forceSubwindowsOnTop(_ flag: Bool) {
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
//MARK: menuItem Action
|
|
|
|
|
|
@objc func menuItemEditingClick_FontColor(sender: NSMenuItem) {
|
|
@@ -132,10 +123,10 @@ extension KMMainViewController {
|
|
|
}
|
|
|
|
|
|
@objc func menuItemEditingClick_CropImage(sender: NSMenuItem) {
|
|
|
-
|
|
|
- if self.listView.cropAreas != nil && self.listView.selectImageAreas != nil{
|
|
|
- self.listView.cropEditImageArea(self.listView.selectImageAreas, withBounds: self.listView.cropAreas.cropRect)
|
|
|
- }
|
|
|
+
|
|
|
+ if self.listView.cropAreas != nil && self.listView.selectImageAreas != nil{
|
|
|
+ self.listView.cropEditImageArea(self.listView.selectImageAreas, withBounds: self.listView.cropAreas.cropRect)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@objc func menuItemAnnotationClick_toolModel(sender: NSMenuItem) {
|
|
@@ -536,21 +527,7 @@ extension KMMainViewController {
|
|
|
}
|
|
|
|
|
|
//MARK: - action
|
|
|
-
|
|
|
- // 开启左边栏
|
|
|
- @objc func openLeftPane() -> Void {
|
|
|
- self.model.leftPanelOpen = true
|
|
|
- applyLeftSideWidth(self.model.panelWidth+functionWidth, rightSideWidth: self.model.lastRightPanWidth)
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- // 关闭左边栏
|
|
|
- @objc func closeLeftPane() -> Void {
|
|
|
- self.model.leftPanelOpen = false
|
|
|
- applyLeftSideWidth(functionWidth, rightSideWidth: self.model.lastRightPanWidth)
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
func rename(_ sender: NSNotification) -> Void {
|
|
|
if (self.view.window == nil || self.view.window!.isVisible == false) {
|
|
|
return
|
|
@@ -663,9 +640,7 @@ extension KMMainViewController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
func closeTab(_ sender: NSNotification) -> Void {
|
|
|
|
|
|
}
|
|
@@ -797,8 +772,7 @@ extension KMMainViewController {
|
|
|
}
|
|
|
}
|
|
|
func aiTranslationPDFFileAction() {
|
|
|
-
|
|
|
- self._aiTranslationPDFFileAction()
|
|
|
+ self._aiTranslationPDFFileAction()
|
|
|
}
|
|
|
|
|
|
private func _aiTranslationPDFFileAction() {
|
|
@@ -930,9 +904,7 @@ extension KMMainViewController {
|
|
|
}
|
|
|
let pageIndex = listView.currentPageIndexAndPoint(&point, rotated: nil)
|
|
|
|
|
|
- setup[kWindowFrameKey] = NSStringFromRect(mainWindow?.frame ?? NSZeroRect)
|
|
|
- setup[KMMainModel.Key.kLeftSidePaneWidth] = self.model.lastLeftPanWidth
|
|
|
- setup[KMMainModel.Key.kRightSidePaneWidth] = self.model.lastRightPanWidth
|
|
|
+ setup[kWindowFrameKey] = NSStringFromRect(mainWindow?.frame ?? NSZeroRect)
|
|
|
setup[KMMainModel.Key.pageIndex] = pageIndex
|
|
|
|
|
|
return setup
|