Skip to content

Commit

Permalink
[FIX] some typos
Browse files Browse the repository at this point in the history
[ADD] about panel
  • Loading branch information
Pyroh committed Sep 5, 2016
1 parent e09e054 commit a6be090
Show file tree
Hide file tree
Showing 6 changed files with 115 additions and 29 deletions.
6 changes: 6 additions & 0 deletions Fluor/AboutWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@
import Cocoa

class AboutWindowController: NSWindowController {
@IBOutlet weak var versionLabel: NSTextField!

override func windowDidLoad() {
super.windowDidLoad()

window?.styleMask.formUnion(.fullSizeContentView)
window?.titleVisibility = .hidden
window?.titlebarAppearsTransparent = true
window?.setFrameAutosaveName("AboutWindowAutosaveName")

let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as! String
let build = Bundle.main.infoDictionary?[kCFBundleVersionKey as String] as! String
versionLabel.stringValue = "Version \(version) build \(build)"
}

}
88 changes: 78 additions & 10 deletions Fluor/AboutWindowController.xib
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,103 @@
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11198.2"/>
<capability name="box content view" minToolsVersion="7.0"/>
<capability name="system font weights other than Regular or Bold" minToolsVersion="7.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="AboutWindowController" customModule="Fluor" customModuleProvider="target">
<connections>
<outlet property="versionLabel" destination="hE3-0a-X4T" id="PF6-2p-bsO"/>
<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="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" texturedBackground="YES"/>
<windowStyleMask key="styleMask" titled="YES" closable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="273" height="249"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="900"/>
<rect key="contentRect" x="196" y="240" width="408" height="168"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="877"/>
<view key="contentView" wantsLayer="YES" id="se5-gp-TjO">
<rect key="frame" x="0.0" y="0.0" width="273" height="249"/>
<rect key="frame" x="0.0" y="0.0" width="408" height="168"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="XgN-Gd-YMR">
<rect key="frame" x="104" y="165" width="64" height="64"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="NSApplicationIcon" id="4oW-VD-wt3"/>
</imageView>
<box boxType="custom" borderType="none" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="ebm-T4-bC5">
<rect key="frame" x="0.0" y="0.0" width="408" height="168"/>
<view key="contentView" id="Ndo-Rr-Xc1">
<rect key="frame" x="0.0" y="0.0" width="408" height="168"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="XgN-Gd-YMR">
<rect key="frame" x="20" y="20" width="128" height="128"/>
<constraints>
<constraint firstAttribute="height" constant="128" id="mC2-Ul-Utd"/>
<constraint firstAttribute="width" constant="128" id="qIQ-JR-PV4"/>
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="NSApplicationIcon" id="4oW-VD-wt3"/>
</imageView>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="YMM-N8-YqM">
<rect key="frame" x="188" y="38" width="200" height="92"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4M7-Z7-g7h">
<rect key="frame" x="-2" y="44" width="87" height="48"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Fluor" id="UJe-Rr-uVC">
<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"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hE3-0a-X4T">
<rect key="frame" x="-2" y="19" width="50" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Version" id="aIm-CN-SpM">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ph2-GS-RQB">
<rect key="frame" x="-2" y="0.0" width="127" height="11"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Copyright (c) Pyrolyse 2016" id="wgD-d7-yIk">
<font key="font" metaFont="system" size="9"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstItem="Ph2-GS-RQB" firstAttribute="top" secondItem="hE3-0a-X4T" secondAttribute="bottom" constant="8" id="0Ig-g0-sAi"/>
<constraint firstItem="hE3-0a-X4T" firstAttribute="leading" secondItem="YMM-N8-YqM" secondAttribute="leading" id="766-yh-Jz5"/>
<constraint firstAttribute="bottom" secondItem="Ph2-GS-RQB" secondAttribute="bottom" id="Pm9-WF-BvT"/>
<constraint firstItem="hE3-0a-X4T" firstAttribute="top" secondItem="4M7-Z7-g7h" secondAttribute="bottom" constant="8" id="aS0-cn-Kn8"/>
<constraint firstItem="4M7-Z7-g7h" firstAttribute="leading" secondItem="YMM-N8-YqM" secondAttribute="leading" id="gA2-W9-jss"/>
<constraint firstItem="Ph2-GS-RQB" firstAttribute="leading" secondItem="YMM-N8-YqM" secondAttribute="leading" id="o9b-mj-CJe"/>
<constraint firstItem="4M7-Z7-g7h" firstAttribute="top" secondItem="YMM-N8-YqM" secondAttribute="top" id="ptP-pE-Uah"/>
</constraints>
</customView>
</subviews>
<constraints>
<constraint firstItem="XgN-Gd-YMR" firstAttribute="leading" secondItem="Ndo-Rr-Xc1" secondAttribute="leading" constant="20" id="HuY-vi-E5J"/>
<constraint firstItem="YMM-N8-YqM" firstAttribute="centerY" secondItem="XgN-Gd-YMR" secondAttribute="centerY" id="OSu-D4-eNV"/>
<constraint firstItem="YMM-N8-YqM" firstAttribute="leading" secondItem="XgN-Gd-YMR" secondAttribute="trailing" constant="40" id="dAA-tw-Ybp"/>
<constraint firstItem="XgN-Gd-YMR" firstAttribute="top" secondItem="Ndo-Rr-Xc1" secondAttribute="top" constant="20" id="gVI-y8-hmB"/>
<constraint firstAttribute="bottom" secondItem="XgN-Gd-YMR" secondAttribute="bottom" constant="20" id="yaV-A5-piP"/>
<constraint firstAttribute="trailing" secondItem="YMM-N8-YqM" secondAttribute="trailing" constant="20" id="zNQ-tG-eTO"/>
</constraints>
</view>
<color key="fillColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</box>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="ebm-T4-bC5" secondAttribute="bottom" id="B5x-28-COX"/>
<constraint firstItem="ebm-T4-bC5" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" id="Bfg-ea-pbJ"/>
<constraint firstAttribute="trailing" secondItem="ebm-T4-bC5" secondAttribute="trailing" id="ZE8-1v-KNx"/>
<constraint firstItem="ebm-T4-bC5" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" id="fI9-Rm-3mh"/>
</constraints>
</view>
<connections>
<outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
</connections>
<point key="canvasLocation" x="35.5" y="150.5"/>
<point key="canvasLocation" x="19" y="40"/>
</window>
</objects>
<resources>
Expand Down
18 changes: 11 additions & 7 deletions Fluor/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
</menuItem>
<menuItem title="About Fluor" id="Ib7-Rw-HnK">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="showAbout:" target="e3h-DP-voU" id="VAz-Kx-NL8"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="dNi-gO-s9S"/>
<menuItem title="Quit" keyEquivalent="q" id="QjA-WT-wFW">
Expand All @@ -57,19 +60,19 @@
<point key="canvasLocation" x="-70" y="-283"/>
</menu>
<customView id="u6O-d0-7Hq" customClass="StateView" customModule="Fluor" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="189" height="34"/>
<rect key="frame" x="0.0" y="0.0" width="229" height="34"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="DvO-d4-urd">
<rect key="frame" x="18" y="10" width="53" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Default" id="S28-Jt-nN1">
<font key="font" metaFont="systemHeavy" size="13"/>
<rect key="frame" x="18" y="10" width="91" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Default mode" id="S28-Jt-nN1">
<font key="font" metaFont="systemBold"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="kdK-wj-mRZ">
<rect key="frame" x="83" y="7" width="87" height="20"/>
<rect key="frame" x="123" y="7" width="87" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="18" id="DFc-vh-F3H"/>
</constraints>
Expand All @@ -91,6 +94,7 @@
</subviews>
<constraints>
<constraint firstItem="kdK-wj-mRZ" firstAttribute="top" secondItem="u6O-d0-7Hq" secondAttribute="top" constant="8" id="0pW-Lh-f5f"/>
<constraint firstItem="kdK-wj-mRZ" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="DvO-d4-urd" secondAttribute="trailing" constant="8" id="K8p-bd-pGC"/>
<constraint firstItem="DvO-d4-urd" firstAttribute="baseline" secondItem="kdK-wj-mRZ" secondAttribute="baseline" id="SAX-m8-xIz"/>
<constraint firstItem="DvO-d4-urd" firstAttribute="leading" secondItem="u6O-d0-7Hq" secondAttribute="leading" constant="20" id="b2B-Vd-Tpz"/>
<constraint firstAttribute="bottom" secondItem="kdK-wj-mRZ" secondAttribute="bottom" constant="8" id="d3Y-vD-TKu"/>
Expand All @@ -99,7 +103,7 @@
<connections>
<outlet property="stateSelector" destination="kdK-wj-mRZ" id="Egq-Rm-zuG"/>
</connections>
<point key="canvasLocation" x="442" y="-343"/>
<point key="canvasLocation" x="461.5" y="-343"/>
</customView>
<customView id="o8r-mD-TI5" customClass="CurrentAppView" customModule="Fluor" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="248" height="80"/>
Expand All @@ -122,7 +126,7 @@
<constraint firstAttribute="width" constant="136" id="R5y-ap-31T"/>
</constraints>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Label" id="nND-dO-QEg">
<font key="font" metaFont="systemBold"/>
<font key="font" metaFont="systemSemibold" size="13"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
Expand Down
2 changes: 1 addition & 1 deletion Fluor/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>0.1 beta</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>3</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.productivity</string>
<key>LSMinimumSystemVersion</key>
Expand Down
5 changes: 3 additions & 2 deletions Fluor/RulesEditorWindowController.xib
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11198.2"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="system font weights other than Regular or Bold" minToolsVersion="7.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="RulesEditorWindowController" customModule="Fluor" customModuleProvider="target">
Expand All @@ -18,7 +19,7 @@
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="300" height="452"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="900"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="877"/>
<view key="contentView" wantsLayer="YES" id="se5-gp-TjO">
<rect key="frame" x="0.0" y="0.0" width="300" height="452"/>
<autoresizingMask key="autoresizingMask"/>
Expand Down Expand Up @@ -71,7 +72,7 @@
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="vGL-jN-8Su">
<rect key="frame" x="-2" y="26" width="205" height="17"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Label" id="Cza-D1-ACA">
<font key="font" metaFont="systemBold"/>
<font key="font" metaFont="systemSemibold" size="13"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
Expand Down
Loading

0 comments on commit a6be090

Please sign in to comment.