|
@@ -188,7 +188,11 @@ class KMToolbarViewController: NSViewController, NSTextFieldDelegate {
|
|
|
|
|
|
@IBAction func changeAnnotationMode(item: KMToolbarClickButton) {
|
|
|
self.delegate?.changeAnnotationModeAction?(item: item)
|
|
|
- self._itemSetPromptFlag(item: item.clickObject as? KMToolbarItemView)
|
|
|
+ if item.isKind(of: KMToolbarClickButton.self) {
|
|
|
+ self._itemSetPromptFlag(item: item.clickObject as? KMToolbarItemView)
|
|
|
+ } else {
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@IBAction func leftControllButtonAction(item: KMToolbarClickButton) {
|
|
@@ -788,11 +792,12 @@ extension KMToolbarViewController : KMToolbarViewDelegate,NSToolbarItemValidatio
|
|
|
item?.alternateImage = NSImage(named: KMImageNameUXIconSubtoolbarPageInsert)
|
|
|
item?.target = self
|
|
|
item?.btnTag = KMPageEditType.insert.rawValue
|
|
|
- // item?.toolTip = NSLocalizedString("Inserting pages into an existing PDF", comment: "")
|
|
|
+ item?.isShowCustomToolTip = true
|
|
|
+ item?.toolTip = NSLocalizedString("Inserting pages into an existing PDF", comment: "")
|
|
|
+ item?.isPopToolTip = true
|
|
|
item?.titleName = NSLocalizedString("Insert", comment: "")
|
|
|
- item?.boxImagePosition = .imageExpandLeft
|
|
|
- // item?.btnAction = #selector(insertMenuAction)
|
|
|
- item?.needExpandAction = true
|
|
|
+ item?.boxImagePosition = .imageOnly
|
|
|
+ item?.btnAction = #selector(_itemAction)
|
|
|
} else if (identifier == KMToolbarPageEditExtractItemIdentifier) {
|
|
|
item?.image = NSImage(named: KMImageNameUXIconSubtoolbarPageExtract)
|
|
|
item?.alternateImage = NSImage(named: KMImageNameUXIconSubtoolbarPageExtract)
|
|
@@ -816,10 +821,12 @@ extension KMToolbarViewController : KMToolbarViewDelegate,NSToolbarItemValidatio
|
|
|
item?.alternateImage = NSImage(named: KMImageNameUXIconSubtoolbarPageSplit)
|
|
|
item?.target = self
|
|
|
item?.btnTag = KMPageEditType.split.rawValue
|
|
|
- // item?.toolTip = NSLocalizedString("Split and save selected PDF pages as a new separate document", comment: "")
|
|
|
+ item?.isShowCustomToolTip = true
|
|
|
+ item?.toolTip = NSLocalizedString("Split and save selected PDF pages as a new separate document", comment: "")
|
|
|
+ item?.isPopToolTip = true
|
|
|
item?.titleName = NSLocalizedString("Split", comment: "")
|
|
|
- item?.boxImagePosition = .imageExpandLeft
|
|
|
- item?.needExpandAction = true
|
|
|
+ item?.boxImagePosition = .imageOnly
|
|
|
+ item?.btnAction = #selector(_itemAction)
|
|
|
} else if (identifier == KMToolbarPageEditReverseItemIdentifier) {
|
|
|
item?.image = NSImage(named: KMImageNameUXIconSubtoolbarPageReverse)
|
|
|
item?.alternateImage = NSImage(named: KMImageNameUXIconSubtoolbarPageReverse)
|