About winndow...
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2018 Jean-David Gadina - www.xs-labs.com
|
||||
* Copyright (c) 2020 Jean-David Gadina - www.xs-labs.com
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -24,31 +24,33 @@
|
||||
|
||||
import Cocoa
|
||||
|
||||
@objc class AboutWindowController: NSWindowController
|
||||
public class AboutWindowController: NSWindowController
|
||||
{
|
||||
@objc private dynamic var name: String?
|
||||
@objc private dynamic var version: String?
|
||||
@objc private dynamic var copyright: String?
|
||||
|
||||
override var windowNibName: NSNib.Name?
|
||||
public override var windowNibName: NSNib.Name?
|
||||
{
|
||||
return NSNib.Name( NSStringFromClass( type( of: self ) ) )
|
||||
return NSStringFromClass( type( of: self ) )
|
||||
}
|
||||
|
||||
override func windowDidLoad()
|
||||
override public func windowDidLoad()
|
||||
{
|
||||
super.windowDidLoad()
|
||||
|
||||
self.window?.titlebarAppearsTransparent = true
|
||||
self.window?.titleVisibility = .hidden
|
||||
let version = Bundle.main.object( forInfoDictionaryKey: "CFBundleShortVersionString" ) as? String ?? "0.0.0"
|
||||
|
||||
self.name = Bundle.main.object( forInfoDictionaryKey: "CFBundleName" ) as? String
|
||||
self.version = Bundle.main.object( forInfoDictionaryKey: "CFBundleShortVersionString" ) as? String
|
||||
self.copyright = Bundle.main.object( forInfoDictionaryKey: "NSHumanReadableCopyright" ) as? String
|
||||
|
||||
if let rev = Bundle.main.object( forInfoDictionaryKey: "CFBundleVersion" ) as? String
|
||||
if let build = Bundle.main.object( forInfoDictionaryKey: "CFBundleVersion" ) as? String
|
||||
{
|
||||
self.version?.append( " (" + rev + ")" )
|
||||
self.version = "\(version) (\(build))"
|
||||
}
|
||||
else
|
||||
{
|
||||
self.version = version
|
||||
}
|
||||
|
||||
self.name = Bundle.main.object( forInfoDictionaryKey: "CFBundleName" ) as? String
|
||||
self.copyright = Bundle.main.object( forInfoDictionaryKey: "NSHumanReadableCopyright" ) as? String
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2018 XS-Labs. All rights reserved.</string>
|
||||
<string>Copyright © 2020 XS-Labs. All rights reserved.</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
||||
@@ -1,95 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17506" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17506"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="AboutWindowController" customModule="Notarize" customModuleProvider="target">
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="AboutWindowController" customModule="Xclean" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="window" destination="QvC-M9-y7g" id="3uC-xA-AhB"/>
|
||||
<outlet property="window" destination="QvC-M9-y7g" id="MQd-GZ-qWp"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<window title="About" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="QvC-M9-y7g">
|
||||
<window title="About Xclean" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" titlebarAppearsTransparent="YES" titleVisibility="hidden" id="QvC-M9-y7g">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" fullSizeContentView="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="196" y="240" width="395" height="296"/>
|
||||
<rect key="contentRect" x="196" y="240" width="277" height="168"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1175"/>
|
||||
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="395" height="296"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="307" height="198"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<visualEffectView appearanceType="vibrantDark" blendingMode="behindWindow" material="windowBackground" state="followsWindowActiveState" translatesAutoresizingMaskIntoConstraints="NO" id="2na-Z2-u9Y">
|
||||
<rect key="frame" x="0.0" y="0.0" width="395" height="296"/>
|
||||
<visualEffectView blendingMode="behindWindow" material="underWindowBackground" state="followsWindowActiveState" translatesAutoresizingMaskIntoConstraints="NO" id="ls5-I3-hMR">
|
||||
<rect key="frame" x="0.0" y="0.0" width="307" height="198"/>
|
||||
<subviews>
|
||||
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="H8T-8E-DDN">
|
||||
<rect key="frame" x="20" y="20" width="256" height="256"/>
|
||||
<imageView wantsLayer="YES" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="bkJ-Ud-XM8">
|
||||
<rect key="frame" x="30" y="30" width="128" height="128"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="256" id="HER-vU-ej4"/>
|
||||
<constraint firstAttribute="height" constant="256" id="tEO-yL-v7f"/>
|
||||
<constraint firstAttribute="width" constant="128" id="CSW-JZ-Wa6"/>
|
||||
<constraint firstAttribute="height" constant="128" id="kJV-3v-pYD"/>
|
||||
</constraints>
|
||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="NSApplicationIcon" id="6bs-kJ-2MD"/>
|
||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="NSApplicationIcon" id="GGX-kf-SmE"/>
|
||||
</imageView>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="eUO-Xh-gcg">
|
||||
<rect key="frame" x="282" y="177" width="95" height="24"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Label" id="n4t-G6-Fj5">
|
||||
<font key="font" metaFont="systemThin" size="20"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="version" id="9GC-rX-a5S"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="zOn-oh-QdP">
|
||||
<rect key="frame" x="282" y="50" width="95" height="16"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Label" id="JEk-lW-tk0">
|
||||
<font key="font" metaFont="systemThin" size="13"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="copyright" id="j3k-9t-5tC"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="2ba-9s-ZV8">
|
||||
<rect key="frame" x="282" y="209" width="95" height="47"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Label" id="UGy-b9-cuI">
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="c3B-11-Nnn">
|
||||
<rect key="frame" x="186" y="111" width="93" height="47"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="Mhf-3U-WaO">
|
||||
<font key="font" metaFont="systemThin" size="40"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="name" id="OKL-6y-FGO"/>
|
||||
<binding destination="-2" name="value" keyPath="self.name" id="joW-A0-HfH"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<textField wantsLayer="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="yLd-6Z-IaF">
|
||||
<rect key="frame" x="186" y="79" width="50" height="24"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="GPR-R9-Yud">
|
||||
<font key="font" metaFont="systemThin" size="20"/>
|
||||
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="self.version" id="zcF-Mv-hcv"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<textField wantsLayer="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="qK4-am-2Hl">
|
||||
<rect key="frame" x="186" y="40" width="36" height="16"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="CqC-AJ-UHI">
|
||||
<font key="font" metaFont="systemThin" size="13"/>
|
||||
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<binding destination="-2" name="value" keyPath="self.copyright" id="Q5j-jh-2rr"/>
|
||||
</connections>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="H8T-8E-DDN" firstAttribute="top" secondItem="2na-Z2-u9Y" secondAttribute="top" constant="20" id="3I5-PH-yU3"/>
|
||||
<constraint firstItem="zOn-oh-QdP" firstAttribute="leading" secondItem="eUO-Xh-gcg" secondAttribute="leading" id="9z8-TQ-exV"/>
|
||||
<constraint firstItem="eUO-Xh-gcg" firstAttribute="top" secondItem="2ba-9s-ZV8" secondAttribute="bottom" constant="8" id="Ab9-it-JUm"/>
|
||||
<constraint firstAttribute="trailing" secondItem="zOn-oh-QdP" secondAttribute="trailing" constant="20" id="H1w-13-zMV"/>
|
||||
<constraint firstItem="zOn-oh-QdP" firstAttribute="bottom" secondItem="H8T-8E-DDN" secondAttribute="bottom" constant="-30" id="I3a-5Y-YXv"/>
|
||||
<constraint firstItem="eUO-Xh-gcg" firstAttribute="leading" secondItem="2ba-9s-ZV8" secondAttribute="leading" id="QtV-Me-2JH"/>
|
||||
<constraint firstAttribute="trailing" secondItem="eUO-Xh-gcg" secondAttribute="trailing" constant="20" id="ZzX-cc-IvF"/>
|
||||
<constraint firstAttribute="trailing" secondItem="2ba-9s-ZV8" secondAttribute="trailing" constant="20" id="a49-qe-KTA"/>
|
||||
<constraint firstItem="2ba-9s-ZV8" firstAttribute="top" secondItem="H8T-8E-DDN" secondAttribute="top" constant="20" id="hUd-bj-u1o"/>
|
||||
<constraint firstItem="H8T-8E-DDN" firstAttribute="leading" secondItem="2na-Z2-u9Y" secondAttribute="leading" constant="20" id="qEC-HE-IWz"/>
|
||||
<constraint firstAttribute="bottom" secondItem="H8T-8E-DDN" secondAttribute="bottom" constant="20" id="sib-85-ry4"/>
|
||||
<constraint firstItem="2ba-9s-ZV8" firstAttribute="leading" secondItem="H8T-8E-DDN" secondAttribute="trailing" constant="8" id="zlY-3J-nRY"/>
|
||||
<constraint firstItem="qK4-am-2Hl" firstAttribute="bottom" secondItem="bkJ-Ud-XM8" secondAttribute="bottom" constant="-10" id="4eU-i4-CHR"/>
|
||||
<constraint firstItem="c3B-11-Nnn" firstAttribute="leading" secondItem="bkJ-Ud-XM8" secondAttribute="trailing" constant="30" id="BpG-VA-Nxl"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="yLd-6Z-IaF" secondAttribute="trailing" constant="30" id="IQu-ql-HkC"/>
|
||||
<constraint firstItem="qK4-am-2Hl" firstAttribute="leading" secondItem="c3B-11-Nnn" secondAttribute="leading" id="Yot-mk-hra"/>
|
||||
<constraint firstItem="bkJ-Ud-XM8" firstAttribute="top" secondItem="ls5-I3-hMR" secondAttribute="top" constant="40" id="bpQ-Rd-Kjd"/>
|
||||
<constraint firstItem="yLd-6Z-IaF" firstAttribute="top" secondItem="c3B-11-Nnn" secondAttribute="bottom" constant="8" id="cvA-Hq-TDd"/>
|
||||
<constraint firstItem="bkJ-Ud-XM8" firstAttribute="leading" secondItem="ls5-I3-hMR" secondAttribute="leading" constant="30" id="mLH-C3-hte"/>
|
||||
<constraint firstAttribute="bottom" secondItem="bkJ-Ud-XM8" secondAttribute="bottom" constant="30" id="nEf-eO-eJA"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="c3B-11-Nnn" secondAttribute="trailing" constant="30" id="oqv-O4-gKi"/>
|
||||
<constraint firstItem="c3B-11-Nnn" firstAttribute="top" secondItem="bkJ-Ud-XM8" secondAttribute="top" id="ryd-fl-aVO"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="qK4-am-2Hl" secondAttribute="trailing" constant="30" id="xUl-C7-IqA"/>
|
||||
<constraint firstItem="yLd-6Z-IaF" firstAttribute="leading" secondItem="c3B-11-Nnn" secondAttribute="leading" id="zma-HZ-8Vb"/>
|
||||
</constraints>
|
||||
</visualEffectView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="2na-Z2-u9Y" firstAttribute="width" secondItem="EiT-Mj-1SZ" secondAttribute="width" id="4dA-8n-C7v"/>
|
||||
<constraint firstItem="2na-Z2-u9Y" firstAttribute="centerY" secondItem="EiT-Mj-1SZ" secondAttribute="centerY" id="O55-qt-7R1"/>
|
||||
<constraint firstItem="2na-Z2-u9Y" firstAttribute="centerX" secondItem="EiT-Mj-1SZ" secondAttribute="centerX" id="dSe-Gv-BQM"/>
|
||||
<constraint firstItem="2na-Z2-u9Y" firstAttribute="height" secondItem="EiT-Mj-1SZ" secondAttribute="height" id="hu6-Xm-VtI"/>
|
||||
<constraint firstItem="ls5-I3-hMR" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" id="O6b-Af-UWg"/>
|
||||
<constraint firstItem="ls5-I3-hMR" firstAttribute="leading" secondItem="EiT-Mj-1SZ" secondAttribute="leading" id="OTa-DV-nY1"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ls5-I3-hMR" secondAttribute="trailing" id="S6O-Rs-Cnd"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ls5-I3-hMR" secondAttribute="bottom" id="hL3-Sx-v9S"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<point key="canvasLocation" x="-53.5" y="-162"/>
|
||||
<point key="canvasLocation" x="37.5" y="147"/>
|
||||
</window>
|
||||
</objects>
|
||||
<resources>
|
||||
|
||||
Reference in New Issue
Block a user