|
@@ -9,6 +9,9 @@ import Cocoa
|
|
|
|
|
|
class KMNoteOutlineFilterViewController: NSViewController {
|
|
|
|
|
|
+ @IBOutlet weak var cancelWidthConst: NSLayoutConstraint!
|
|
|
+ @IBOutlet weak var applyWidthConst: NSLayoutConstraint!
|
|
|
+
|
|
|
private var _notesArray: NSArray?
|
|
|
func setNotesArray(_ notesArray: NSArray?) {
|
|
|
self._notesArray = notesArray
|
|
@@ -155,9 +158,13 @@ class KMNoteOutlineFilterViewController: NSViewController {
|
|
|
self.cancelButton.title = KMLocalizedString("Cancel", nil)
|
|
|
self.cancelButton.setTitleColor(KMAppearance.Layout.h0Color())
|
|
|
self.cancelButton.wantsLayer = true
|
|
|
+ let cwidth = self.cancelButton.title.boundingRect(with: CGSizeMake(CGFloat(MAXFLOAT), 20), options: .usesLineFragmentOrigin, attributes: [.font : self.cancelButton.font ?? NSFont.systemFont(ofSize: 12)]).size.width
|
|
|
+ self.cancelWidthConst.constant = cwidth + 7 * 2
|
|
|
self.OKButton.title = KMLocalizedString("Apply", nil)
|
|
|
self.OKButton.setTitleColor(KMAppearance.Layout.w0Color())
|
|
|
self.OKButton.wantsLayer = true
|
|
|
+ let owidth = self.OKButton.title.boundingRect(with: CGSizeMake(CGFloat(MAXFLOAT), 20), options: .usesLineFragmentOrigin, attributes: [.font : self.OKButton.font ?? NSFont.systemFont(ofSize: 12)]).size.width
|
|
|
+ self.applyWidthConst.constant = owidth + 7 * 2
|
|
|
|
|
|
self.cancelButton.layer?.cornerRadius = 1.0
|
|
|
self.OKButton.layer?.cornerRadius = 1.0
|