|
@@ -149,7 +149,12 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
|
|
|
// self.thumbnailView.dragMoveEffectAnimated = true
|
|
|
// self.thumbnailView.collectionView.backgroundColor(NSColor.km_init(hex: "#CED0D4"))
|
|
|
self.thumbnailView.collectionView.wantsLayer = true
|
|
|
- self.thumbnailView.collectionView.layer?.backgroundColor = KMAppearance.PDFViewBackgroundColor().cgColor
|
|
|
+// self.thumbnailView.collectionView.layer?.backgroundColor = KMAppearance.PDFViewBackgroundColor().cgColor
|
|
|
+ if KMAppearance.isDarkMode() {
|
|
|
+ self.thumbnailView.collectionView.layer?.backgroundColor = NSColor.km_init(hex: "#5F5F60").cgColor
|
|
|
+ } else {
|
|
|
+ self.thumbnailView.collectionView.layer?.backgroundColor = NSColor.km_init(hex: "#DADBDE").cgColor
|
|
|
+ }
|
|
|
|
|
|
self.thumbnailSizeView.wantsLayer = true
|
|
|
self.thumbnailSizeView.layer?.backgroundColor = KMAppearance.Layout.b80Color().cgColor
|
|
@@ -253,7 +258,7 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
|
|
|
indexs.sort(){$0 < $1}
|
|
|
self.toolBar.setPageRangeString(KMPageRangeTools.newParseSelectedIndexs(selectedIndex: indexs))
|
|
|
|
|
|
- if let view = self.listView { // 存储阅读视图的当前页面索引
|
|
|
+ if self.listView != nil { // 存储阅读视图的当前页面索引
|
|
|
if indexs.count != 0 {
|
|
|
self._listViewCurrentIndex = indexs.last!
|
|
|
}
|
|
@@ -261,6 +266,22 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ override func interfaceThemeDidChanged(_ appearance: NSAppearance.Name) {
|
|
|
+ super.interfaceThemeDidChanged(appearance)
|
|
|
+
|
|
|
+ self.thumbnailView.collectionView.wantsLayer = true
|
|
|
+ if KMAppearance.isDarkMode() {
|
|
|
+ self.thumbnailView.collectionView.layer?.backgroundColor = NSColor.km_init(hex: "#5F5F60").cgColor
|
|
|
+ } else {
|
|
|
+ self.thumbnailView.collectionView.layer?.backgroundColor = NSColor.km_init(hex: "#DADBDE").cgColor
|
|
|
+ }
|
|
|
+ Task { @MainActor in
|
|
|
+ let ips = self.thumbnailView.selectionIndexPaths
|
|
|
+ self.thumbnailView.collectionView.reloadData()
|
|
|
+ self.thumbnailView.selectionIndexPaths = ips
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// MARK: Private Methods
|
|
|
|
|
|
private func getSelecteIndex() -> Int {
|