|
@@ -1273,6 +1273,21 @@ extension KMMainViewController {
|
|
toItem.unEnabled = true
|
|
toItem.unEnabled = true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ func updateZoomInOutButtonState() {
|
|
|
|
+ let item : KMToolBoxItem = (self.toolbarController.mainToolBarView?.toolbarItemFindItemIdentifiers(value: KMDocumentZoomToolbarItemIdentifier))!
|
|
|
|
+ let toItem : KMToolBoxItem = (self.toolbarController.mainToolBarView?.toolbarItemFindItemIdentifiers(value: KMDocumentZoomOutToolbarItemIdentifier))!
|
|
|
|
+ if self.listView.canZoomIn {
|
|
|
|
+ item.unEnabled = false
|
|
|
|
+ } else {
|
|
|
|
+ item.unEnabled = true
|
|
|
|
+ }
|
|
|
|
+ if self.listView.canZoomOut {
|
|
|
|
+ toItem.unEnabled = false
|
|
|
|
+ } else {
|
|
|
|
+ toItem.unEnabled = true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
extension KMMainViewController: KMSecondaryViewControllerDelegate {
|
|
extension KMMainViewController: KMSecondaryViewControllerDelegate {
|
|
@@ -1349,10 +1364,12 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
|
|
|
|
|
|
func changePDFViewZoomInAction() {
|
|
func changePDFViewZoomInAction() {
|
|
self.listView.zoomIn(nil)
|
|
self.listView.zoomIn(nil)
|
|
|
|
+ self.updateZoomInOutButtonState()
|
|
}
|
|
}
|
|
|
|
|
|
func changePDFViewZoomOutAction() {
|
|
func changePDFViewZoomOutAction() {
|
|
self.listView.zoomOut(nil)
|
|
self.listView.zoomOut(nil)
|
|
|
|
+ self.updateZoomInOutButtonState()
|
|
}
|
|
}
|
|
|
|
|
|
func changePDFViewGotoNextPageAction() {
|
|
func changePDFViewGotoNextPageAction() {
|