Browse Source

【2025】【BOTA】搜索列表 - 替换button点两次后,颜色看起来和禁用差不多修复

lizhe 3 weeks ago
parent
commit
3133afd548

+ 1 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift

@@ -945,6 +945,7 @@ struct KMNMWCFlags {
             infoContendSplitView.setPosition(MIN_SIDE_PANE_WIDTH.doubleValue, ofDividerAt: 0) //暂时无法记录上一次打开的宽度
         }
         if pdfSideBarType == .search {
+            viewManager.pdfSideBarType = .search
             botaViewController?.searchViewC.handdler.pdfView = listView
             botaViewController?.leftsideType = .search
         } else if pdfSideBarType == .thumbnail {

+ 2 - 2
PDF Office/PDF Master/KMClass/Left/Search/View/KMNBotaSearchTopView.swift

@@ -51,14 +51,14 @@ class KMNBotaSearchTopView: NSView, NibLoadable {
     
     private lazy var replaceButton_: ComponentButton = {
         let view = ComponentButton()
-        view.properties = ComponentButtonProperty(type: .text_gray_low, size: .xxs, state: .normal, onlyIcon: true, icon: NSImage(named: "KMImageNameBotaSearchReplace"))
+        view.properties = ComponentButtonProperty(type: .text_gray_low, size: .xxs, state: .normal, onlyIcon: true, icon: NSImage(named: "KMImageNameBotaSearchReplace"), keepPressState: false)
         view.setTarget(self, action: #selector(replaceAction))
         return view
     }()
     
     private lazy var switchButton_: ComponentButton = {
         let view = ComponentButton()
-        view.properties = ComponentButtonProperty(type: .text_gray_low, size: .xxs, state: .normal, onlyIcon: true, icon: NSImage(named: "KMImageNameBotaSearchSwitch"))
+        view.properties = ComponentButtonProperty(type: .text_gray_low, size: .xxs, state: .normal, onlyIcon: true, icon: NSImage(named: "KMImageNameBotaSearchSwitch"), keepPressState: false)
         view.setTarget(self, action: #selector(switchAction))
         return view
     }()