1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- //
- // KMUnbindAlertViewController.swift
- // PDF Reader Pro
- //
- // Created by Niehaoyu on 2024/8/7.
- //
- import Cocoa
- @objc class KMUnbindAlertViewController: NSViewController {
- @IBOutlet var contendView: NSView!
-
- @IBOutlet var titleLabel: NSTextField!
- @IBOutlet var contactButton: KMCustomButton!
-
-
- override func viewDidLoad() {
- super.viewDidLoad()
- // Do view setup here.
-
- self.contendView.wantsLayer = true
-
- self.contactButton.wantsLayer = true
- self.contactButton.layer?.masksToBounds = true
- self.contactButton.layer?.cornerRadius = 1
- self.contactButton.title = NSLocalizedString("Contact Support", comment: "")
- self.contactButton.setTitleColor(KMAppearance.Layout.h0Color())
-
- self.titleLabel.font = NSFont.SFProTextRegularFont(16)
-
-
- self.updateViewColor()
- }
-
- @objc func updateViewColor() {
- if KMAppearance.isDarkMode() {
- self.contendView.layer?.backgroundColor = NSColor(red: 33/255, green: 33/255, blue: 33/255, alpha: 1).cgColor
- self.titleLabel.textColor = NSColor.white
- self.contactButton.layer?.backgroundColor = NSColor(red: 78/255, green: 127/255, blue: 219/255, alpha: 1).cgColor
- } else {
- self.contendView.layer?.backgroundColor = NSColor.white.cgColor
- self.titleLabel.textColor = NSColor.black
- self.contactButton.layer?.backgroundColor = NSColor(red: 39/255, green: 60/255, blue: 98/255, alpha: 1).cgColor
- }
- }
-
- //MARK: - IBAction
- @IBAction func contactAction(_ sender: KMCustomButton) {
-
- }
-
- }
|