KMLeftSideEmptyFileViewController.swift 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 emptySnapView: NSView!
  12. @IBOutlet weak var addOutlineBox: NSBox!
  13. @IBOutlet weak var annotationBox: NSBox!
  14. @IBOutlet weak var leftSnapBox: NSBox!
  15. @IBOutlet weak var exportAnnotationBtn: NSButton!
  16. @IBOutlet weak var deleteAnnotationBtn: NSButton!
  17. @IBOutlet weak var filterAnnotationBtn: NSButton!
  18. @IBOutlet weak var addOutlineBtn: NSButton!
  19. @IBOutlet weak var deleteOutlineBtn: NSButton!
  20. @IBOutlet weak var printSnapBtn: NSButton!
  21. @IBOutlet weak var exportSnapBtn: NSButton!
  22. @IBOutlet weak var deleteSnapBtn: NSButton!
  23. @IBOutlet weak var searchOutlineSearchField: NSSearchField!
  24. @IBOutlet weak var outlineSearchView: NSView!
  25. @IBOutlet weak var notCreateOutLine: NSTextField!
  26. @IBOutlet weak var emptyOutlineLabel: NSTextField!
  27. @IBOutlet weak var emptyAnnotationLabel: NSTextField!
  28. @IBOutlet weak var emptySnapLabel: NSTextField!
  29. @IBOutlet weak var emptySearchResultLabel: NSTextField!
  30. @IBOutlet weak var snapshotNotCreatedLabel: NSTextField!
  31. override func loadView() {
  32. super.loadView()
  33. self.emptyOutlineLabel.stringValue = KMLocalizedString("To create outline item select header in contents, right click it and select \"Add Outline Item\" or click \"+\" above.")
  34. self.emptyOutlineLabel.textColor = KMAppearance.Layout.h2Color()
  35. self.notCreateOutLine.stringValue = KMLocalizedString("No outlines")
  36. self.notCreateOutLine.textColor = KMAppearance.Layout.h0Color()
  37. self.emptyAnnotationLabel.stringValue = KMLocalizedString("No Annotations")
  38. // self.emptyAnnotationLabel.textColor = KMAppearance.Layout.h0Color()
  39. self.emptyAnnotationLabel.textColor = NSColor.km_init(hex: "#94989C")
  40. self.emptySnapLabel.stringValue = KMLocalizedString("To create snapshot select an area in contents, right click it and select \"Snapshot\" .")
  41. self.emptySnapLabel.textColor = KMAppearance.Layout.h2Color()
  42. self.snapshotNotCreatedLabel.stringValue = KMLocalizedString("No Snapshots")
  43. self.snapshotNotCreatedLabel.textColor = KMAppearance.Layout.h0Color()
  44. self.searchOutlineSearchField.placeholderString = KMLocalizedString("Search Outline")
  45. self.exportAnnotationBtn.toolTip = NSLocalizedString("Export Annotations…", tableName: "MainMenu", comment: "")
  46. self.deleteAnnotationBtn.toolTip = NSLocalizedString("Remove All Annotations", tableName: "MainMenu", comment: "")
  47. self.filterAnnotationBtn.toolTip = KMLocalizedString("Note Type")
  48. self.addOutlineBox.toolTip = KMLocalizedString("Add Outline Item")
  49. self.deleteOutlineBtn.toolTip = KMLocalizedString("Delete")
  50. self.deleteSnapBtn.toolTip = KMLocalizedString("Delete")
  51. self.exportSnapBtn.toolTip = KMLocalizedString("Export")
  52. self.printSnapBtn.toolTip = KMLocalizedString("Print")
  53. self.emptySearchResultLabel.stringValue = KMLocalizedString("No Results")
  54. self.emptySearchResultLabel.textColor = KMAppearance.Layout.h0Color()
  55. self.emptySnapView.wantsLayer = true
  56. self.emptySnapView.layer?.backgroundColor = .clear
  57. self.outlineSearchView.wantsLayer = true
  58. self.outlineSearchView.layer?.backgroundColor = .clear
  59. self.emptyAnnotationView.wantsLayer = true
  60. self.emptyAnnotationView.layer?.backgroundColor = .clear
  61. self.emptyOutlineView.wantsLayer = true
  62. self.emptyOutlineView.layer?.backgroundColor = .clear
  63. }
  64. override func viewDidLoad() {
  65. super.viewDidLoad()
  66. // Do view setup here.
  67. }
  68. }