[About Dialog] Implemented new About dialog

Signed-off-by: Kevin López Brante <kevin@kddlb.cl>
swiftingly
Kevin López 2022-06-20 21:58:22 -04:00
parent 6fb991f95e
commit 2ce719c7fa
6 changed files with 251 additions and 14 deletions

BIN
AboutCog.jp2 Normal file

Binary file not shown.

View File

@ -25,17 +25,17 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<splitView dividerStyle="thin" vertical="YES" translatesAutoresizingMaskIntoConstraints="NO" id="2123">
<rect key="frame" x="0.0" y="277" width="1000" height="123"/>
<rect key="frame" x="0.0" y="345" width="1000" height="55"/>
<subviews>
<scrollView fixedFrame="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="24" horizontalPageScroll="0.0" verticalLineScroll="24" verticalPageScroll="0.0" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" id="206" userLabel="Scroll View - Playlist View">
<rect key="frame" x="0.0" y="0.0" width="1000" height="123"/>
<rect key="frame" x="0.0" y="0.0" width="1000" height="55"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="KWC-Ti-8KY">
<rect key="frame" x="0.0" y="0.0" width="1000" height="123"/>
<rect key="frame" x="0.0" y="0.0" width="1000" height="55"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" alternatingRowBackgroundColors="YES" autosaveName="Playlist" rowHeight="18" headerView="1517" viewBased="YES" id="207" customClass="PlaylistView">
<rect key="frame" x="0.0" y="0.0" width="1000" height="106"/>
<rect key="frame" x="0.0" y="0.0" width="1000" height="38"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<size key="intercellSpacing" width="3" height="6"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
@ -229,11 +229,11 @@
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<prototypeCellViews>
<tableCellView id="gpC-Oe-Rog">
<rect key="frame" x="235" y="3" width="149" height="18"/>
<rect key="frame" x="235" y="3" width="150" height="18"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="1WK-qN-Mgj">
<rect key="frame" x="0.0" y="1" width="149" height="16"/>
<rect key="frame" x="0.0" y="1" width="150" height="16"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="71l-3L-S3g">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@ -273,7 +273,7 @@
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<prototypeCellViews>
<tableCellView id="1ed-gX-bct">
<rect key="frame" x="387" y="3" width="151" height="18"/>
<rect key="frame" x="388" y="3" width="151" height="18"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="nEt-s5-vRX">
@ -316,11 +316,11 @@
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<prototypeCellViews>
<tableCellView id="hhB-nv-e78">
<rect key="frame" x="541" y="3" width="95" height="18"/>
<rect key="frame" x="542" y="3" width="96" height="18"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="tHy-sM-HDB">
<rect key="frame" x="0.0" y="1" width="95" height="16"/>
<rect key="frame" x="0.0" y="1" width="96" height="16"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="Igo-5f-yim">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@ -360,7 +360,7 @@
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<prototypeCellViews>
<tableCellView id="q93-oh-i5T">
<rect key="frame" x="639" y="3" width="94" height="18"/>
<rect key="frame" x="641" y="3" width="94" height="18"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="bOi-LI-TDx">
@ -401,7 +401,7 @@
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<prototypeCellViews>
<tableCellView id="rRl-p9-Awr">
<rect key="frame" x="736" y="3" width="144" height="18"/>
<rect key="frame" x="738" y="3" width="144" height="18"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="yW6-2w-6mN">
@ -441,11 +441,11 @@
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<prototypeCellViews>
<tableCellView id="hgh-VE-5kl">
<rect key="frame" x="883" y="3" width="38" height="18"/>
<rect key="frame" x="885" y="3" width="39" height="18"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="yEY-MI-d3o">
<rect key="frame" x="0.0" y="1" width="38" height="16"/>
<rect key="frame" x="0.0" y="1" width="39" height="16"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="tus-lr-RhS">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@ -1239,7 +1239,7 @@
<menuItem title="About Cog" id="58">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="orderFrontStandardAboutPanel:" target="-2" id="142"/>
<action selector="showWindow:" target="Hd4-Wy-Rfl" id="xfd-8T-SL4"/>
</connections>
</menuItem>
<menuItem title="Check for Updates..." id="302">
@ -2404,6 +2404,7 @@ Gw
<outlet property="playbackController" destination="705" id="jJw-Zl-5DT"/>
</connections>
</customObject>
<customObject id="Hd4-Wy-Rfl" customClass="AboutWindowController" customModule="Cog" customModuleProvider="target"/>
</objects>
<resources>
<image name="deadItemsTemplate" width="20" height="20"/>

View File

@ -9,6 +9,10 @@
/* Begin PBXBuildFile section */
07D971E60ED1DAA800E7602E /* TagEditorController.m in Sources */ = {isa = PBXBuildFile; fileRef = 07D971E50ED1DAA800E7602E /* TagEditorController.m */; };
07E18DF30D62B38400BB0E11 /* NSArray+ShuffleUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 07E18DF20D62B38400BB0E11 /* NSArray+ShuffleUtils.m */; };
0A9CEA032861501700E47168 /* AboutWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A9CEA012861501700E47168 /* AboutWindowController.swift */; };
0A9CEA042861501700E47168 /* AboutWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0A9CEA022861501700E47168 /* AboutWindowController.xib */; };
0A9CEA092861506A00E47168 /* AboutCog.jp2 in Resources */ = {isa = PBXBuildFile; fileRef = 0A9CEA082861506A00E47168 /* AboutCog.jp2 */; };
0A9CEA0B286152DF00E47168 /* DraggableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A9CEA0A286152DF00E47168 /* DraggableView.swift */; };
170B55940D6E5E7B006B9E92 /* StatusImageTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 170B55930D6E5E7B006B9E92 /* StatusImageTransformer.m */; };
171B57DD0C091F2B00F6AFAF /* flac.icns in Resources */ = {isa = PBXBuildFile; fileRef = 171B57D90C091F2B00F6AFAF /* flac.icns */; };
171B57DE0C091F2B00F6AFAF /* m4a.icns in Resources */ = {isa = PBXBuildFile; fileRef = 171B57DA0C091F2B00F6AFAF /* m4a.icns */; };
@ -758,6 +762,10 @@
07D971E50ED1DAA800E7602E /* TagEditorController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TagEditorController.m; path = TagEditor/TagEditorController.m; sourceTree = "<group>"; };
07E18DF10D62B38400BB0E11 /* NSArray+ShuffleUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+ShuffleUtils.h"; sourceTree = "<group>"; };
07E18DF20D62B38400BB0E11 /* NSArray+ShuffleUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+ShuffleUtils.m"; sourceTree = "<group>"; };
0A9CEA012861501700E47168 /* AboutWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AboutWindowController.swift; path = Window/AboutWindowController.swift; sourceTree = "<group>"; };
0A9CEA022861501700E47168 /* AboutWindowController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = AboutWindowController.xib; path = Window/AboutWindowController.xib; sourceTree = "<group>"; };
0A9CEA082861506A00E47168 /* AboutCog.jp2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = AboutCog.jp2; sourceTree = "<group>"; };
0A9CEA0A286152DF00E47168 /* DraggableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = DraggableView.swift; path = Window/DraggableView.swift; sourceTree = "<group>"; };
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
170B55920D6E5E7B006B9E92 /* StatusImageTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StatusImageTransformer.h; sourceTree = "<group>"; };
170B55930D6E5E7B006B9E92 /* StatusImageTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StatusImageTransformer.m; sourceTree = "<group>"; };
@ -1260,6 +1268,7 @@
177EC02D0B8BC2E60000BC8C /* Images */ = {
isa = PBXGroup;
children = (
0A9CEA082861506A00E47168 /* AboutCog.jp2 */,
8349270B27B4EFFC0009AB2B /* deadItemsTemplate.pdf */,
8349270127B4EFFC0009AB2B /* duplicateItemsTemplate.pdf */,
8314A46527A28C28000EBE7E /* equalizerTemplate.pdf */,
@ -1448,6 +1457,9 @@
17E0D6190F520F9F005B6FED /* VolumeButton.m */,
17E0D61A0F520F9F005B6FED /* VolumeSlider.h */,
17E0D61B0F520F9F005B6FED /* VolumeSlider.m */,
0A9CEA012861501700E47168 /* AboutWindowController.swift */,
0A9CEA022861501700E47168 /* AboutWindowController.xib */,
0A9CEA0A286152DF00E47168 /* DraggableView.swift */,
);
name = Window;
sourceTree = "<group>";
@ -2526,12 +2538,14 @@
831B99BF27C23E88005A969B /* Cog.sdef in Resources */,
832923AF279FAC400048201E /* Cog.q1.json in Resources */,
83229CA0283B0095004626A8 /* SpectrumWindow.xib in Resources */,
0A9CEA042861501700E47168 /* AboutWindowController.xib in Resources */,
836F462A28207FA4005B9B87 /* PauseColorful.png in Resources */,
17D1B2820CF8B2830028F5B5 /* vg.icns in Resources */,
17D1B2830CF8B2830028F5B5 /* xm.icns in Resources */,
83ED3AD1279A91C000904199 /* hdcdLogoTemplate.pdf in Resources */,
836F462328207F55005B9B87 /* PlayNormal.png in Resources */,
8384916318083EAB00E7332D /* repeatModeAlbumTemplate.pdf in Resources */,
0A9CEA092861506A00E47168 /* AboutCog.jp2 in Resources */,
83978E29285C5C0A0076ED21 /* GoogleService-Info.plist in Resources */,
8384916118083EAB00E7332D /* previousTemplate.pdf in Resources */,
1778D3B00F645A190037E7A0 /* missingArt.png in Resources */,
@ -2607,6 +2621,7 @@
EDAAA41F25A665C000731773 /* PositionSliderToolbarItem.swift in Sources */,
1791FF900CB43A2C0070BC5C /* MediaKeysApplication.m in Sources */,
5604D45B0D60349B004F5C5D /* SpotlightWindowController.m in Sources */,
0A9CEA032861501700E47168 /* AboutWindowController.swift in Sources */,
5604D4F60D60726E004F5C5D /* SpotlightPlaylistEntry.m in Sources */,
56462EAF0D6341F6000AB68C /* SpotlightTransformers.m in Sources */,
830C37A527B95EB300E02BB0 /* EqualizerWindowController.m in Sources */,
@ -2626,6 +2641,7 @@
179D03200E0CB2500064A77A /* DirectoryNode.m in Sources */,
179D03210E0CB2500064A77A /* FileIconCell.m in Sources */,
179D03220E0CB2500064A77A /* FileNode.m in Sources */,
0A9CEA0B286152DF00E47168 /* DraggableView.swift in Sources */,
83988F0E27BE0A5900A0E89A /* RedundantPlaylistDataStore.m in Sources */,
179D03230E0CB2500064A77A /* FileTreeDataSource.m in Sources */,
179D03240E0CB2500064A77A /* FileTreeController.m in Sources */,

View File

@ -0,0 +1,57 @@
//
// AboutWIndowController.swift
// Cog
//
// Created by Kevin López Brante on 20-06-22.
//
import Cocoa
class AboutWindowController: NSWindowController {
@IBOutlet weak var appName: NSTextField!
@IBOutlet weak var appVersion: NSTextField!
@IBOutlet weak var appCopyright: NSTextField!
@IBOutlet var creditsView: NSTextView!
override var windowNibName: NSNib.Name? {
return "AboutWindowController"
}
@IBOutlet weak var vfxView: NSVisualEffectView!
override func windowDidLoad() {
super.windowDidLoad()
self.window?.center()
self.window?.isMovableByWindowBackground = true
vfxView.wantsLayer = true
vfxView.canDrawSubviewsIntoLayer = true
vfxView.layer?.cornerRadius = 10.0
vfxView.layer?.masksToBounds = true
// fill up labels
appName.stringValue = Bundle.main.object(forInfoDictionaryKey: "CFBundleName") as! String
let shortVersionString = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as! String
let fullVersionString = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as! String
appVersion.stringValue = String.localizedStringWithFormat( NSLocalizedString("Version %@ (%@)", comment: "Version string"), shortVersionString, fullVersionString);
appCopyright.stringValue = Bundle.main.object(forInfoDictionaryKey: "NSHumanReadableCopyright") as! String
if let creditsFile = Bundle.main.url(forResource: "Credits", withExtension: "html") {
let data = try! Data(contentsOf: creditsFile)
if let attributedString = try? NSAttributedString(data: data, options: [.documentType: NSAttributedString.DocumentType.html], documentAttributes: nil) {
creditsView.textStorage?.setAttributedString(attributedString)
}
}
}
}

View File

@ -0,0 +1,133 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="20037" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="20037"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="AboutWIndowController" customModule="Cog" customModuleProvider="target">
<connections>
<outlet property="appCopyright" destination="ht5-N1-YXd" id="cUK-kB-F2V"/>
<outlet property="appName" destination="Lya-f1-R7S" id="ZVN-sE-MQp"/>
<outlet property="appVersion" destination="7dE-CE-MBv" id="qOe-3F-tMG"/>
<outlet property="creditsView" destination="iz8-0U-jtY" id="uMm-WQ-Fui"/>
<outlet property="imageView" destination="aIO-L9-zMj" id="cIl-Ce-onP"/>
<outlet property="vfxView" destination="2nK-dq-1h6" id="ToT-af-ycD"/>
<outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window title="About Cog" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" appearanceType="darkAqua" animationBehavior="default" titlebarAppearsTransparent="YES" titleVisibility="hidden" id="F0z-JX-Cv5">
<windowStyleMask key="styleMask" titled="YES" closable="YES" fullSizeContentView="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="669" height="402"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
<view key="contentView" id="se5-gp-TjO">
<rect key="frame" x="0.0" y="0.0" width="669" height="402"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<visualEffectView blendingMode="behindWindow" material="underWindowBackground" state="followsWindowActiveState" translatesAutoresizingMaskIntoConstraints="NO" id="aIO-L9-zMj" customClass="DraggableVFXView" customModule="Cog" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="669" height="402"/>
<subviews>
<imageView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="vd3-xP-mqK" customClass="DraggableImageView" customModule="Cog" customModuleProvider="target">
<rect key="frame" x="-24" y="0.0" width="717" height="402"/>
<autoresizingMask key="autoresizingMask"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" animates="YES" imageScaling="proportionallyDown" image="AboutCog" id="qq1-7L-Xab"/>
</imageView>
<visualEffectView blendingMode="withinWindow" material="fullScreenUI" state="followsWindowActiveState" translatesAutoresizingMaskIntoConstraints="NO" id="2nK-dq-1h6">
<rect key="frame" x="387" y="84" width="262" height="230"/>
<subviews>
<scrollView appearanceType="aqua" borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HLG-H1-ARK">
<rect key="frame" x="0.0" y="0.0" width="262" height="230"/>
<clipView key="contentView" drawsBackground="NO" id="VsR-Lq-AhX">
<rect key="frame" x="0.0" y="0.0" width="247" height="230"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textView editable="NO" verticallyResizable="YES" findStyle="bar" allowsDocumentBackgroundColorChange="YES" spellingCorrection="YES" smartInsertDelete="YES" id="iz8-0U-jtY">
<rect key="frame" x="0.0" y="0.0" width="247" height="230"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<size key="minSize" width="247" height="230"/>
<size key="maxSize" width="247" height="10000000"/>
<color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
</textView>
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="Jrl-HU-vmJ">
<rect key="frame" x="-100" y="-100" width="225" height="15"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" verticalHuggingPriority="750" horizontal="NO" id="z2b-Sa-SQ9">
<rect key="frame" x="247" y="0.0" width="15" height="230"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
</subviews>
<constraints>
<constraint firstItem="HLG-H1-ARK" firstAttribute="leading" secondItem="2nK-dq-1h6" secondAttribute="leading" id="RIy-GD-jCE"/>
<constraint firstItem="HLG-H1-ARK" firstAttribute="top" secondItem="2nK-dq-1h6" secondAttribute="top" id="Ye7-Xs-CXc"/>
<constraint firstAttribute="trailing" secondItem="HLG-H1-ARK" secondAttribute="trailing" id="tZ8-S3-bky"/>
<constraint firstAttribute="bottom" secondItem="HLG-H1-ARK" secondAttribute="bottom" id="vNr-Wi-0vq"/>
</constraints>
</visualEffectView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Lya-f1-R7S">
<rect key="frame" x="385" y="351" width="266" height="31"/>
<textFieldCell key="cell" lineBreakMode="clipping" selectable="YES" title="Cog" usesSingleLineMode="YES" id="hzl-Rl-e01">
<font key="font" textStyle="largeTitle" name=".SFNS-Regular"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7dE-CE-MBv">
<rect key="frame" x="385" y="322" width="266" height="21"/>
<textFieldCell key="cell" lineBreakMode="clipping" selectable="YES" title="Version..." usesSingleLineMode="YES" id="Wjf-By-C1F">
<font key="font" textStyle="title2" name=".SFNS-Regular"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ht5-N1-YXd">
<rect key="frame" x="387" y="20" width="264" height="56"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" selectable="YES" title="Copyright..." id="wLU-AJ-J0b">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstItem="2nK-dq-1h6" firstAttribute="leading" secondItem="aIO-L9-zMj" secondAttribute="leading" constant="387" id="0dy-BM-sdM"/>
<constraint firstAttribute="bottom" secondItem="2nK-dq-1h6" secondAttribute="bottom" constant="84" id="Ffv-wZ-Cof"/>
<constraint firstItem="2nK-dq-1h6" firstAttribute="top" secondItem="aIO-L9-zMj" secondAttribute="top" constant="88" id="H3P-wu-hjK"/>
<constraint firstItem="2nK-dq-1h6" firstAttribute="trailing" secondItem="Lya-f1-R7S" secondAttribute="trailing" id="MRi-8c-G4r"/>
<constraint firstItem="7dE-CE-MBv" firstAttribute="top" secondItem="Lya-f1-R7S" secondAttribute="bottom" constant="8" symbolic="YES" id="VQP-7X-fVC"/>
<constraint firstAttribute="trailing" secondItem="2nK-dq-1h6" secondAttribute="trailing" constant="20" symbolic="YES" id="gdk-KM-koO"/>
<constraint firstItem="2nK-dq-1h6" firstAttribute="top" secondItem="7dE-CE-MBv" secondAttribute="bottom" constant="8" symbolic="YES" id="iz2-Bu-fht"/>
<constraint firstItem="2nK-dq-1h6" firstAttribute="leading" secondItem="Lya-f1-R7S" secondAttribute="leading" id="k1m-83-vY5"/>
<constraint firstItem="2nK-dq-1h6" firstAttribute="leading" secondItem="7dE-CE-MBv" secondAttribute="leading" id="o1t-V1-cRl"/>
<constraint firstItem="2nK-dq-1h6" firstAttribute="trailing" secondItem="7dE-CE-MBv" secondAttribute="trailing" id="paq-sD-7Qd"/>
</constraints>
</visualEffectView>
</subviews>
<constraints>
<constraint firstItem="aIO-L9-zMj" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="Bob-HZ-hjD"/>
<constraint firstAttribute="bottom" secondItem="aIO-L9-zMj" secondAttribute="bottom" id="H6Y-Aw-rKw"/>
<constraint firstAttribute="trailing" secondItem="aIO-L9-zMj" secondAttribute="trailing" id="YNg-Cm-Dr0"/>
<constraint firstAttribute="bottom" secondItem="aIO-L9-zMj" secondAttribute="bottom" id="gDu-u6-WBY"/>
<constraint firstItem="aIO-L9-zMj" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="lpm-bh-BFJ"/>
</constraints>
</view>
<connections>
<outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
</connections>
<point key="canvasLocation" x="234.5" y="181"/>
</window>
</objects>
<resources>
<image name="AboutCog" width="2048" height="1152"/>
</resources>
</document>

View File

@ -0,0 +1,30 @@
//
// DraggableView.swift
// Cog
//
// Created by Kevin López Brante on 20-06-22.
//
import Cocoa
class DraggableImageView: NSImageView {
override func draw(_ dirtyRect: NSRect) {
super.draw(dirtyRect)
// Drawing code here.
}
override func mouseDown(with event: NSEvent) {
window?.performDrag(with: event)
}
}
class DraggableVFXView: NSVisualEffectView {
override func mouseDown(with event: NSEvent) {
window?.performDrag(with: event)
}
}