123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- //
- // KMBatchoperateConvertCollectionViewItem.swift
- // PDF Reader Pro
- //
- // Created by kdanmobile on 2023/11/1.
- //
- import Cocoa
- class KMBatchoperateConvertCollectionViewItem: NSCollectionViewItem{
- var selectLayer: CALayer?
-
- @IBOutlet var advancedButton: NSButton!
-
- @IBOutlet var containerView: NSView!
-
- @IBOutlet var moreInfoTextField: NSTextField!
-
- @IBOutlet var icomIV: NSImageView!
-
- @IBOutlet var nameTF: NSTextField!
-
- override func viewDidLoad() {
- super.viewDidLoad()
- self.nameTF!.font = NSFont.systemFont(ofSize: 12)
- nameTF!.textColor = KMAppearance.Layout.h1Color()
- moreInfoTextField.font = NSFont.boldSystemFont(ofSize: 9)
- moreInfoTextField.textColor = KMAppearance.Layout.mColor()
- view.wantsLayer = true
- selectLayer = CALayer()
- view.layer?.addSublayer(selectLayer!)
- selectLayer?.frame = CGRect(x: 0, y: 0, width: 64, height: 76)
- selectLayer!.backgroundColor = KMAppearance.Status.selColor().cgColor
- selectLayer?.cornerRadius = 6
- selectLayer!.isHidden = true
- moreInfoTextField.sizeToFit()
- containerView.wantsLayer = true
- containerView.layer?.cornerRadius = moreInfoTextField.bounds.height / 2
- }
- override var isSelected: Bool{
- get{
- return super.isSelected
- }
- set{
- super.isSelected = newValue
- self.selectLayer?.isHidden = !newValue
- }
- }
-
- @IBAction func buttonClicked_AdvancedClicked(_ sender: Any) {
- // if !IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
- // KMProductCompareWC.shared.orientation = false
- // KMProductCompareWC.shared.showWindow(nil)
- // }
- if !KMMemberInfo.shared.isPermitConvert {
- KMMemberInfo.shared.advancedFunctionUsage()
- }
- }
- }
|