//
//  KMToolbarMainItemView.swift
//  PDF Reader Pro
//
//  Created by tangchao on 2023/12/14.
//

import Cocoa

class KMToolbarMainItemView: KMToolbarItemView {

    override class var textFont: NSFont {
        get {
            .systemFont(ofSize: 11)
        }
    }
    
    override class func fetchTextNormalColor() -> NSColor {
        return KMAppearance.subtitleColor()
    }
    
    override class func fetchTextSelectedColor() -> NSColor {
        return KMAppearance.subtitleColor()
    }
    
    override func draw(_ dirtyRect: NSRect) {
        super.draw(dirtyRect)

        // Drawing code here.
    }
    
    override func layout() {
        super.layout()
        
        if let view = self.promptView, view.superview != nil {
            let wh: CGFloat = 6
            let y: CGFloat = 1
            let centenX: CGFloat = NSWidth(self.bounds) * 0.5
//            let imgW = NS /Width(self.imageViewBtn.frame)
            let imgW: CGFloat = 24
            view.frame = NSMakeRect(centenX+imgW*0.5-wh-1, NSHeight(self.bounds)-wh-y, wh, wh)
        }
    }
    
}