Improve the artwork selector collection view.
This commit is contained in:
5 files changed
+143
-95
No files matched your search
@@ -41,11 +41,11 @@ DQ
|
|||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="8">
|
<slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="8">
|
||||||
<rect key="frame" x="364" y="49" width="96" height="18"/>
|
<rect key="frame" x="360" y="49" width="100" height="18"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstAttribute="width" constant="96" id="0Mf-Un-HXH"/>
|
<constraint firstAttribute="width" constant="100" id="0Mf-Un-HXH"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<sliderCell key="cell" controlSize="small" continuous="YES" alignment="left" minValue="100" maxValue="500" doubleValue="250" tickMarkPosition="above" numberOfTickMarks="5" sliderType="linear" id="15"/>
|
<sliderCell key="cell" controlSize="small" continuous="YES" alignment="left" maxValue="100" doubleValue="50" tickMarkPosition="above" numberOfTickMarks="5" sliderType="linear" id="15"/>
|
||||||
<accessibility description="Zoom"/>
|
<accessibility description="Zoom"/>
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="zoomSliderDidChange:" target="-2" id="44"/>
|
<action selector="zoomSliderDidChange:" target="-2" id="44"/>
|
||||||
|
|||||||
@@ -267,10 +267,14 @@ class CollectionView : NSCollectionView {
|
|||||||
nextResponder?.keyDown(with: event)
|
nextResponder?.keyDown(with: event)
|
||||||
} else if selectionIndexPaths.isEmpty {
|
} else if selectionIndexPaths.isEmpty {
|
||||||
if key == NSRightArrowFunctionKey || key == NSDownArrowFunctionKey {
|
if key == NSRightArrowFunctionKey || key == NSDownArrowFunctionKey {
|
||||||
animator().selectItems(at: Set([IndexPath(item: 0, section: 0)]), scrollPosition: .bottom)
|
let indexPathSet = Set([IndexPath(item: 0, section: 0)])
|
||||||
|
animator().selectItems(at: indexPathSet, scrollPosition: .bottom)
|
||||||
|
delegate?.collectionView?(self, didSelectItemsAt: indexPathSet)
|
||||||
} else if key == NSLeftArrowFunctionKey || key == NSUpArrowFunctionKey {
|
} else if key == NSLeftArrowFunctionKey || key == NSUpArrowFunctionKey {
|
||||||
let numberOfItems = dataSource?.collectionView(self, numberOfItemsInSection: 0) ?? 1
|
let numberOfItems = dataSource?.collectionView(self, numberOfItemsInSection: 0) ?? 1
|
||||||
animator().selectItems(at: Set([IndexPath(item: numberOfItems - 1, section: 0)]), scrollPosition: .bottom)
|
let indexPathSet = Set([IndexPath(item: numberOfItems - 1, section: 0)])
|
||||||
|
animator().selectItems(at: indexPathSet, scrollPosition: .bottom)
|
||||||
|
delegate?.collectionView?(self, didSelectItemsAt: indexPathSet)
|
||||||
} else {
|
} else {
|
||||||
super.keyDown(with: event)
|
super.keyDown(with: event)
|
||||||
}
|
}
|
||||||
@@ -352,8 +356,20 @@ class ArtworkSelectorController: NSWindowController, NSCollectionViewDataSource,
|
|||||||
// MARK: - User Interface
|
// MARK: - User Interface
|
||||||
|
|
||||||
@IBAction func zoomSliderDidChange(_ sender: Any) {
|
@IBAction func zoomSliderDidChange(_ sender: Any) {
|
||||||
|
let standardSize = NSSize(width: 154, height: 194)
|
||||||
if let layout = imageBrowser.collectionViewLayout as? NSCollectionViewFlowLayout {
|
if let layout = imageBrowser.collectionViewLayout as? NSCollectionViewFlowLayout {
|
||||||
layout.itemSize = NSSize(width: Int(slider.floatValue), height: Int(slider.floatValue * 1.25))
|
if slider.floatValue == 50 {
|
||||||
|
layout.itemSize = standardSize
|
||||||
|
} else if slider.floatValue < 50 {
|
||||||
|
let zoomValue = (CGFloat(slider.floatValue) + 50) / 100
|
||||||
|
layout.itemSize = NSSize(width: Int(standardSize.width * zoomValue),
|
||||||
|
height: Int(standardSize.height * zoomValue))
|
||||||
|
|
||||||
|
} else {
|
||||||
|
let zoomValue = pow((CGFloat(slider.floatValue) + 50) / 100, 2.4)
|
||||||
|
layout.itemSize = NSSize(width: Int(standardSize.width * zoomValue),
|
||||||
|
height: Int(standardSize.height * zoomValue))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -365,9 +381,7 @@ class ArtworkSelectorController: NSWindowController, NSCollectionViewDataSource,
|
|||||||
imageBrowser.reloadItems(at: [indexPath])
|
imageBrowser.reloadItems(at: [indexPath])
|
||||||
}
|
}
|
||||||
|
|
||||||
if imageBrowser.selectionIndexPaths.isEmpty {
|
|
||||||
imageBrowser.selectionIndexPaths = selectionIndexPaths
|
imageBrowser.selectionIndexPaths = selectionIndexPaths
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func selectArtwork(at index: Int) {
|
private func selectArtwork(at index: Int) {
|
||||||
|
|||||||
@@ -13,15 +13,47 @@ class ArtworkSelectorViewItemLabel : NSTextField {
|
|||||||
@IBInspectable var highlightTextColor: NSColor = .alternateSelectedControlTextColor
|
@IBInspectable var highlightTextColor: NSColor = .alternateSelectedControlTextColor
|
||||||
@IBInspectable var cornerRadius: CGFloat = 3
|
@IBInspectable var cornerRadius: CGFloat = 3
|
||||||
|
|
||||||
|
override init(frame frameRect: NSRect) {
|
||||||
|
super.init(frame: frameRect)
|
||||||
|
addObservers()
|
||||||
|
}
|
||||||
|
|
||||||
|
required init?(coder: NSCoder) {
|
||||||
|
super.init(coder: coder)
|
||||||
|
addObservers()
|
||||||
|
}
|
||||||
|
|
||||||
|
deinit {
|
||||||
|
removeObservers()
|
||||||
|
}
|
||||||
|
|
||||||
|
private func addObservers() {
|
||||||
|
NotificationCenter.default.addObserver(self, selector: #selector(windowDidBecomeKey), name: NSWindow.didBecomeKeyNotification, object: window)
|
||||||
|
NotificationCenter.default.addObserver(self, selector: #selector(windowDidBecomeKey), name: NSWindow.didResignKeyNotification, object: window)
|
||||||
|
}
|
||||||
|
|
||||||
|
private func removeObservers() {
|
||||||
|
NotificationCenter.default.removeObserver(self, name: NSWindow.didBecomeKeyNotification, object: nil)
|
||||||
|
NotificationCenter.default.removeObserver(self, name: NSWindow.didResignKeyNotification, object: nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc func windowDidBecomeKey() {
|
||||||
|
needsDisplay = true
|
||||||
|
}
|
||||||
|
|
||||||
override func draw(_ dirtyRect: NSRect) {
|
override func draw(_ dirtyRect: NSRect) {
|
||||||
|
let windowIsKeyWindow = window?.isKeyWindow ?? false
|
||||||
|
|
||||||
var attributedString = attributedStringValue
|
var attributedString = attributedStringValue
|
||||||
if isHighlighted {
|
|
||||||
|
if isHighlighted && windowIsKeyWindow == true {
|
||||||
let mutableAttributedString = attributedString.mutableCopy() as! NSMutableAttributedString
|
let mutableAttributedString = attributedString.mutableCopy() as! NSMutableAttributedString
|
||||||
let range = NSRange(location: 0, length: mutableAttributedString.length)
|
let range = NSRange(location: 0, length: mutableAttributedString.length)
|
||||||
mutableAttributedString.removeAttribute(NSAttributedString.Key.foregroundColor, range: range)
|
mutableAttributedString.removeAttribute(NSAttributedString.Key.foregroundColor, range: range)
|
||||||
mutableAttributedString.addAttributes([NSAttributedString.Key.foregroundColor : highlightTextColor], range: range)
|
mutableAttributedString.addAttributes([NSAttributedString.Key.foregroundColor : highlightTextColor], range: range)
|
||||||
attributedString = mutableAttributedString
|
attributedString = mutableAttributedString
|
||||||
}
|
}
|
||||||
|
|
||||||
let framesetter = CTFramesetterCreateWithAttributedString(attributedString)
|
let framesetter = CTFramesetterCreateWithAttributedString(attributedString)
|
||||||
|
|
||||||
let path = CGMutablePath()
|
let path = CGMutablePath()
|
||||||
@@ -42,20 +74,19 @@ class ArtworkSelectorViewItemLabel : NSTextField {
|
|||||||
var origins = [CGPoint](repeating: CGPoint.zero, count: lineCount)
|
var origins = [CGPoint](repeating: CGPoint.zero, count: lineCount)
|
||||||
CTFrameGetLineOrigins(totalFrame, CFRange(), &origins)
|
CTFrameGetLineOrigins(totalFrame, CFRange(), &origins)
|
||||||
|
|
||||||
if isHighlighted {
|
for index in 0 ..< lineCount {
|
||||||
for index in 0 ..< lineCount {
|
let line = lines[index]
|
||||||
let line = lines[index]
|
let glyphRuns = CTLineGetGlyphRuns(line) as! [CTRun]
|
||||||
let glyphRuns = CTLineGetGlyphRuns(line) as! [CTRun]
|
let glyphCount = glyphRuns.count
|
||||||
let glyphCount = glyphRuns.count
|
|
||||||
|
|
||||||
let origin = origins[index]
|
let origin = origins[index]
|
||||||
// context.textPosition = pos
|
context.textPosition = origin
|
||||||
|
|
||||||
for i in 0 ..< glyphCount {
|
for i in 0 ..< glyphCount {
|
||||||
let run = glyphRuns[i]
|
let run = glyphRuns[i]
|
||||||
// let attributes = CTRunGetAttributes(run)
|
// let attributes = CTRunGetAttributes(run)
|
||||||
|
// if CFDictionaryGetValue(attributes, "HighlightText") {
|
||||||
// if CFDictionaryGetValue(attributes, "HighlightText") {
|
if isHighlighted {
|
||||||
var runBounds = CGRect.zero
|
var runBounds = CGRect.zero
|
||||||
var ascent: CGFloat = 0, descent: CGFloat = 0, leading: CGFloat = 0
|
var ascent: CGFloat = 0, descent: CGFloat = 0, leading: CGFloat = 0
|
||||||
|
|
||||||
@@ -68,47 +99,95 @@ class ArtworkSelectorViewItemLabel : NSTextField {
|
|||||||
let highlightCGColor = highlightColor.cgColor
|
let highlightCGColor = highlightColor.cgColor
|
||||||
let roundeRect = runBounds.insetBy(dx: -4, dy: 0)
|
let roundeRect = runBounds.insetBy(dx: -4, dy: 0)
|
||||||
let roundedPath = NSBezierPath(roundedRect: roundeRect.integral, xRadius: cornerRadius, yRadius: cornerRadius)
|
let roundedPath = NSBezierPath(roundedRect: roundeRect.integral, xRadius: cornerRadius, yRadius: cornerRadius)
|
||||||
context.setFillColor(highlightCGColor)
|
|
||||||
roundedPath.fill()
|
|
||||||
|
|
||||||
// CTRunDraw(run, context, CFRange())
|
context.setFillColor(windowIsKeyWindow ? highlightCGColor : NSColor.gridColor.cgColor)
|
||||||
// }
|
roundedPath.fill()
|
||||||
}
|
}
|
||||||
|
CTRunDraw(run, context, CFRange())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CTFrameDraw(totalFrame, context)
|
// CTFrameDraw(totalFrame, context)
|
||||||
context.restoreGState()
|
context.restoreGState()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ArtworkSelectorViewItemView: NSView {
|
class ArtworkSelectorViewItemView: NSView {
|
||||||
|
|
||||||
|
let imageLayer: CALayer = CALayer()
|
||||||
|
let backgroundLayer: CALayer = CALayer()
|
||||||
|
|
||||||
|
override init(frame frameRect: NSRect) {
|
||||||
|
super.init(frame: frameRect)
|
||||||
|
setUp()
|
||||||
|
}
|
||||||
|
|
||||||
|
required init?(coder decoder: NSCoder) {
|
||||||
|
super.init(coder: decoder)
|
||||||
|
setUp()
|
||||||
|
}
|
||||||
|
|
||||||
|
private func setUp() {
|
||||||
|
wantsLayer = true
|
||||||
|
|
||||||
|
imageLayer.anchorPoint = CGPoint.zero
|
||||||
|
imageLayer.position = CGPoint(x: 4, y: 40)
|
||||||
|
imageLayer.contentsGravity = .resizeAspect
|
||||||
|
imageLayer.shadowRadius = 1
|
||||||
|
imageLayer.shadowColor = NSColor.labelColor.cgColor
|
||||||
|
imageLayer.shadowOffset = CGSize.zero
|
||||||
|
imageLayer.isOpaque = true
|
||||||
|
backgroundLayer.anchorPoint = CGPoint.zero
|
||||||
|
backgroundLayer.position = CGPoint(x: 0, y: 36)
|
||||||
|
backgroundLayer.cornerRadius = 8
|
||||||
|
backgroundLayer.isHidden = true
|
||||||
|
backgroundLayer.isOpaque = true
|
||||||
|
|
||||||
|
let actions: [String : CAAction] = ["contents": NSNull(),
|
||||||
|
"hidden": NSNull(),
|
||||||
|
"bounds": NSNull()]
|
||||||
|
imageLayer.actions = actions
|
||||||
|
backgroundLayer.actions = actions
|
||||||
|
|
||||||
|
layer?.addSublayer(backgroundLayer)
|
||||||
|
layer?.addSublayer(imageLayer)
|
||||||
|
}
|
||||||
|
|
||||||
override func hitTest(_ point: NSPoint) -> NSView? {
|
override func hitTest(_ point: NSPoint) -> NSView? {
|
||||||
guard let superview = superview else { return nil }
|
guard let superview = superview else { return nil }
|
||||||
|
|
||||||
if super.hitTest(point) != nil {
|
if super.hitTest(point) != nil {
|
||||||
let convertedPoint = superview.convert(point, to: self)
|
let convertedPoint = superview.convert(point, to: self)
|
||||||
if let layer = layer?.sublayers?.last {
|
if imageLayer.hitTest(convertedPoint) != nil {
|
||||||
if layer.hitTest(convertedPoint) != nil {
|
return self
|
||||||
return self
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return superview
|
return superview
|
||||||
} else {
|
} else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override func layout() {
|
||||||
|
super.layout()
|
||||||
|
imageLayer.bounds = CGRect(x: 0, y: 0, width: bounds.width - 8, height: bounds.height - 44)
|
||||||
|
backgroundLayer.bounds = CGRect(x: 0, y: 0, width: bounds.width, height: bounds.height - 36)
|
||||||
|
if #available(OSX 10.14, *) {
|
||||||
|
imageLayer.shadowColor = NSColor.labelColor.cgColor
|
||||||
|
backgroundLayer.backgroundColor = NSColor.unemphasizedSelectedContentBackgroundColor.cgColor
|
||||||
|
} else {
|
||||||
|
backgroundLayer.backgroundColor = NSColor.controlHighlightColor.cgColor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(OSX 10.11, *)
|
@available(OSX 10.11, *)
|
||||||
class ArtworkSelectorViewItem: NSCollectionViewItem {
|
class ArtworkSelectorViewItem: NSCollectionViewItem {
|
||||||
|
|
||||||
@IBOutlet var subTextField: NSTextField!
|
|
||||||
|
|
||||||
private let imageLayer: CALayer = CALayer()
|
|
||||||
private let backgroundLayer: CALayer = CALayer()
|
|
||||||
|
|
||||||
// MARK: Properties
|
// MARK: Properties
|
||||||
|
|
||||||
|
var itemView : ArtworkSelectorViewItemView { get { return (view as? ArtworkSelectorViewItemView)! } }
|
||||||
|
@IBOutlet var subTextField: NSTextField!
|
||||||
|
|
||||||
var doubleAction: Selector?
|
var doubleAction: Selector?
|
||||||
weak var target: AnyObject?
|
weak var target: AnyObject?
|
||||||
|
|
||||||
@@ -131,10 +210,10 @@ class ArtworkSelectorViewItem: NSCollectionViewItem {
|
|||||||
var image: NSImage? {
|
var image: NSImage? {
|
||||||
didSet {
|
didSet {
|
||||||
if image != nil {
|
if image != nil {
|
||||||
imageLayer.contents = image
|
itemView.imageLayer.contents = image
|
||||||
imageLayer.shadowOpacity = 0.8
|
itemView.imageLayer.shadowOpacity = 0.8
|
||||||
} else {
|
} else {
|
||||||
imageLayer.contents = NSImage(imageLiteralResourceName: "Placeholder")
|
itemView.imageLayer.contents = NSImage(imageLiteralResourceName: "Placeholder")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -159,59 +238,12 @@ class ArtworkSelectorViewItem: NSCollectionViewItem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: View Controller life cycle
|
|
||||||
|
|
||||||
override func viewDidLoad() {
|
|
||||||
super.viewDidLoad()
|
|
||||||
|
|
||||||
// self.view.layer?.shouldRasterize = true
|
|
||||||
self.view.canDrawSubviewsIntoLayer = true
|
|
||||||
|
|
||||||
imageLayer.anchorPoint = CGPoint.zero
|
|
||||||
imageLayer.position = CGPoint(x: 4, y: 40)
|
|
||||||
imageLayer.contentsGravity = .resizeAspect
|
|
||||||
imageLayer.shadowRadius = 1
|
|
||||||
imageLayer.shadowColor = NSColor.labelColor.cgColor
|
|
||||||
imageLayer.shadowOffset = CGSize.zero
|
|
||||||
imageLayer.isOpaque = true
|
|
||||||
backgroundLayer.anchorPoint = CGPoint.zero
|
|
||||||
backgroundLayer.position = CGPoint(x: 0, y: 36)
|
|
||||||
backgroundLayer.backgroundColor = NSColor.controlHighlightColor.cgColor
|
|
||||||
backgroundLayer.cornerRadius = 8
|
|
||||||
backgroundLayer.isHidden = true
|
|
||||||
backgroundLayer.isOpaque = true
|
|
||||||
|
|
||||||
let actions: [String : CAAction] = ["contents": NSNull(),
|
|
||||||
"hidden": NSNull(),
|
|
||||||
"bounds": NSNull()]
|
|
||||||
imageLayer.actions = actions
|
|
||||||
backgroundLayer.actions = actions
|
|
||||||
|
|
||||||
view.layer?.addSublayer(backgroundLayer)
|
|
||||||
view.layer?.addSublayer(imageLayer)
|
|
||||||
}
|
|
||||||
|
|
||||||
override func viewDidLayout() {
|
|
||||||
let bounds = self.view.bounds
|
|
||||||
|
|
||||||
imageLayer.bounds = CGRect(x: 0, y: 0, width: bounds.width - 8, height: bounds.height - 44)
|
|
||||||
backgroundLayer.bounds = CGRect(x: 0, y: 0, width: bounds.width, height: bounds.height - 36)
|
|
||||||
|
|
||||||
super.viewDidLayout()
|
|
||||||
}
|
|
||||||
|
|
||||||
static private let paragraph: NSParagraphStyle = {
|
|
||||||
let paragraph = NSMutableParagraphStyle()
|
|
||||||
paragraph.alignment = .center
|
|
||||||
return paragraph
|
|
||||||
}()
|
|
||||||
|
|
||||||
private func updateSelectionHighlight() {
|
private func updateSelectionHighlight() {
|
||||||
if highlightState == .forSelection || (isSelected && highlightState != .forDeselection) {
|
if highlightState == .forSelection || (isSelected && highlightState != .forDeselection) {
|
||||||
backgroundLayer.isHidden = false
|
itemView.backgroundLayer.isHidden = false
|
||||||
textField?.isHighlighted = true
|
textField?.isHighlighted = true
|
||||||
} else {
|
} else {
|
||||||
backgroundLayer.isHidden = true
|
itemView.backgroundLayer.isHidden = true
|
||||||
textField?.isHighlighted = false
|
textField?.isHighlighted = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,26 +19,26 @@
|
|||||||
<rect key="frame" x="0.0" y="0.0" width="128" height="171"/>
|
<rect key="frame" x="0.0" y="0.0" width="128" height="171"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" misplaced="YES" id="Wkh-6c-0tU" customClass="ArtworkSelectorViewItemLabel" customModule="Subler" customModuleProvider="target">
|
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" misplaced="YES" textCompletion="NO" id="Wkh-6c-0tU" customClass="ArtworkSelectorViewItemLabel" customModule="Subler" customModuleProvider="target">
|
||||||
<rect key="frame" x="0.0" y="17" width="128" height="17"/>
|
<rect key="frame" x="-2" y="17" width="132" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||||
<textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="Label" id="TsL-Ak-xnf">
|
<textFieldCell key="cell" allowsUndo="NO" alignment="center" title="Label" drawsBackground="YES" usesSingleLineMode="YES" id="TsL-Ak-xnf">
|
||||||
<font key="font" metaFont="cellTitle"/>
|
<font key="font" metaFont="cellTitle"/>
|
||||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" misplaced="YES" id="fGU-Kh-WjD">
|
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" misplaced="YES" textCompletion="NO" id="fGU-Kh-WjD">
|
||||||
<rect key="frame" x="2" y="4" width="124" height="14"/>
|
<rect key="frame" x="-2" y="4" width="132" height="14"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||||
<textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="Label" id="ggX-Q2-CZ0">
|
<textFieldCell key="cell" allowsUndo="NO" alignment="center" title="Label" drawsBackground="YES" usesSingleLineMode="YES" id="ggX-Q2-CZ0">
|
||||||
<font key="font" metaFont="system" size="10"/>
|
<font key="font" metaFont="system" size="10"/>
|
||||||
<color key="textColor" name="disabledControlTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="disabledControlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
</subviews>
|
</subviews>
|
||||||
<point key="canvasLocation" x="-39" y="112.5"/>
|
<point key="canvasLocation" x="-425" y="83"/>
|
||||||
</customView>
|
</customView>
|
||||||
</objects>
|
</objects>
|
||||||
</document>
|
</document>
|
||||||
@@ -32,7 +32,9 @@ class PresetEditorViewController: SBMovieViewController {
|
|||||||
|
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
|
||||||
view.appearance = NSAppearance(named: .aqua)
|
if #available(OSX 10.14, *) {} else {
|
||||||
|
view.appearance = NSAppearance(named: .aqua)
|
||||||
|
}
|
||||||
presetTitle.stringValue = preset.title
|
presetTitle.stringValue = preset.title
|
||||||
|
|
||||||
preset.changed = true
|
preset.changed = true
|
||||||
|
|||||||
Reference in new issue
Block a user