KMLeftSideEmptyFileViewController.swift 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //
  2. // KMLeftSideEmptyFileViewController.swift
  3. // PDF Reader Pro
  4. //
  5. // Created by tangchao on 2023/11/20.
  6. //
  7. import Cocoa
  8. class KMLeftSideEmptyFileViewController: NSViewController {
  9. @IBOutlet weak var emptyOutlineView: NSView!
  10. @IBOutlet weak var emptyAnnotationView: NSView!
  11. @IBOutlet weak var addOutlineBox: NSBox!
  12. @IBOutlet weak var annotationBox: NSBox!
  13. @IBOutlet weak var leftSnapBox: NSBox!
  14. @IBOutlet weak var exportAnnotationBtn: NSButton!
  15. @IBOutlet weak var deleteAnnotationBtn: NSButton!
  16. @IBOutlet weak var filterAnnotationBtn: NSButton!
  17. @IBOutlet weak var addOutlineBtn: NSButton!
  18. @IBOutlet weak var deleteOutlineBtn: NSButton!
  19. @IBOutlet weak var printSnapBtn: NSButton!
  20. @IBOutlet weak var exportSnapBtn: NSButton!
  21. @IBOutlet weak var deleteSnapBtn: NSButton!
  22. @IBOutlet weak var searchOutlineSearchField: NSSearchField!
  23. @IBOutlet weak var outlineSearchView: NSView!
  24. @IBOutlet weak var notCreateOutLine: NSTextField!
  25. @IBOutlet weak var emptyOutlineLabel: NSTextField!
  26. @IBOutlet weak var emptyAnnotationLabel: NSTextField!
  27. @IBOutlet weak var emptySearchResultLabel: NSTextField!
  28. override func loadView() {
  29. super.loadView()
  30. self.emptyOutlineLabel.stringValue = KMLocalizedString("To create outline item select header in contents, right click it and select \"Add Outline Item\" or click \"+\" above.",nil)
  31. self.emptyOutlineLabel.textColor = KMAppearance.Layout.h2Color()
  32. self.notCreateOutLine.stringValue = KMLocalizedString("No outlines", nil)
  33. self.notCreateOutLine.textColor = KMAppearance.Layout.h0Color()
  34. self.emptyAnnotationLabel.stringValue = KMLocalizedString("No Annotations",nil)
  35. // self.emptyAnnotationLabel.textColor = KMAppearance.Layout.h0Color()
  36. self.emptyAnnotationLabel.textColor = NSColor.km_init(hex: "#94989C")
  37. self.searchOutlineSearchField.placeholderString = KMLocalizedString("Search Outline", nil)
  38. self.exportAnnotationBtn.toolTip = NSLocalizedString("Export Annotations…", tableName: "MainMenu", comment: "")
  39. self.deleteAnnotationBtn.toolTip = NSLocalizedString("Remove All Annotations", tableName: "MainMenu", comment: "")
  40. self.filterAnnotationBtn.toolTip = KMLocalizedString("Note Type", nil)
  41. self.addOutlineBox.toolTip = KMLocalizedString("Add Outline Item", nil)
  42. self.deleteOutlineBtn.toolTip = KMLocalizedString("Delete", nil)
  43. self.deleteSnapBtn.toolTip = KMLocalizedString("Delete", nil)
  44. self.exportSnapBtn.toolTip = KMLocalizedString("Export", nil)
  45. self.printSnapBtn.toolTip = KMLocalizedString("Print", nil)
  46. self.emptySearchResultLabel.stringValue = KMLocalizedString("No Results", nil)
  47. self.emptySearchResultLabel.textColor = KMAppearance.Layout.h0Color()
  48. self.outlineSearchView.wantsLayer = true
  49. self.outlineSearchView.layer?.backgroundColor = .clear
  50. self.emptyAnnotationView.wantsLayer = true
  51. self.emptyAnnotationView.layer?.backgroundColor = .clear
  52. self.emptyOutlineView.wantsLayer = true
  53. self.emptyOutlineView.layer?.backgroundColor = .clear
  54. }
  55. override func viewDidLoad() {
  56. super.viewDidLoad()
  57. // Do view setup here.
  58. }
  59. }