|
@@ -13,7 +13,7 @@ import KMComponentLibrary
|
|
|
@objc optional func redactToolbarControllerDidButtonClick(controller: KMRedactToolbarController, buttonIndex: Int)
|
|
|
}
|
|
|
|
|
|
-class KMRedactToolbarController: NSViewController {
|
|
|
+class KMRedactToolbarController: KMNBaseViewController {
|
|
|
|
|
|
@IBOutlet var contendView: NSView!
|
|
|
@IBOutlet var titleLabel: NSTextField!
|
|
@@ -37,11 +37,20 @@ class KMRedactToolbarController: NSViewController {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ override func updateUILanguage() {
|
|
|
+ super.updateUILanguage()
|
|
|
+
|
|
|
+ self.updateUI()
|
|
|
+ }
|
|
|
+
|
|
|
+ override func updateUIThemeColor() {
|
|
|
+ super.updateUIThemeColor()
|
|
|
+
|
|
|
+ self.updateUI()
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
func setupProperty() {
|
|
|
- titleLabel.stringValue = KMLocalizedString("Redact")
|
|
|
- titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/1")
|
|
|
- titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
|
|
|
-
|
|
|
redactButton.properties = ComponentButtonProperty(type: .text_gray_opacity,
|
|
|
size: .xs,
|
|
|
state: .pressed,
|
|
@@ -86,6 +95,22 @@ class KMRedactToolbarController: NSViewController {
|
|
|
self.contendView.wantsLayer = true
|
|
|
self.contendView.layer?.backgroundColor = ComponentLibrary.shared.getComponentColorFromKey("colorBg/layout-middle").cgColor
|
|
|
|
|
|
+ titleLabel.stringValue = KMLocalizedString("Redact")
|
|
|
+ titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/1")
|
|
|
+ titleLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-s-medium")
|
|
|
+
|
|
|
+ redactButton.properties.buttonText = KMLocalizedString("Redact")
|
|
|
+ redactButton.reloadData()
|
|
|
+
|
|
|
+ propertyButton.properties.buttonText = KMLocalizedString("Properties")
|
|
|
+ propertyButton.reloadData()
|
|
|
+
|
|
|
+ applyButton.properties.buttonText = KMLocalizedString("Apply")
|
|
|
+ applyButton.reloadData()
|
|
|
+
|
|
|
+ exitButton.properties.buttonText = KMLocalizedString("Exit")
|
|
|
+ exitButton.reloadData()
|
|
|
+
|
|
|
}
|
|
|
|
|
|
func reloadData() {
|
|
@@ -93,8 +118,7 @@ class KMRedactToolbarController: NSViewController {
|
|
|
propertyButton.reloadData()
|
|
|
applyButton.reloadData()
|
|
|
exitButton.reloadData()
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@objc func buttonClicked(_ sender: ComponentButton) {
|