Browse Source

Removing transparency slider.

See, no use for that.
v1.2.1
Abhishek Banthia 9 years ago
parent
commit
01d400771f
  1. BIN
      Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate
  2. 1
      Clocker/ApplicationDelegate.m
  3. BIN
      Clocker/Images/PowerIcon-White.png
  4. BIN
      Clocker/Images/Settings-White.png
  5. BIN
      Clocker/Images/WhiteButton.png
  6. 8
      Clocker/Panel.xib
  7. 1
      Clocker/PanelController.h
  8. 15
      Clocker/PanelController.m
  9. 53
      Clocker/Preferences/CLPreferencesView.xib
  10. 17
      Clocker/Preferences/CLPreferencesViewController.m
  11. 2
      Media.xcassets/PowerIcon-White.imageset/Contents.json
  12. BIN
      Media.xcassets/PowerIcon-White.imageset/PowerIcon-White.png
  13. BIN
      Media.xcassets/PowerIcon-White.imageset/PowerIcon-Whitw2.png
  14. 21
      Media.xcassets/Settings-White.imageset/Contents.json
  15. BIN
      Media.xcassets/Settings-White.imageset/Settings-White.png
  16. 21
      Media.xcassets/WhiteButton.imageset/Contents.json
  17. BIN
      Media.xcassets/WhiteButton.imageset/WhiteButton.png

BIN
Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate generated

Binary file not shown.

1
Clocker/ApplicationDelegate.m

@ -112,7 +112,6 @@ void *kContextActivePanel = &kContextActivePanel;
[[NSUserDefaults standardUserDefaults] setObject:@"Default" forKey:@"defaultTheme"]; [[NSUserDefaults standardUserDefaults] setObject:@"Default" forKey:@"defaultTheme"];
} }
// Install icon into the menu bar // Install icon into the menu bar
self.menubarController = [[MenubarController alloc] init]; self.menubarController = [[MenubarController alloc] init];

BIN
Clocker/Images/PowerIcon-White.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 16 KiB

BIN
Clocker/Images/Settings-White.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
Clocker/Images/WhiteButton.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

8
Clocker/Panel.xib

@ -86,12 +86,12 @@
</textFieldCell> </textFieldCell>
</textField> </textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" tag="101" translatesAutoresizingMaskIntoConstraints="NO" id="vnv-J2-7r1"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" tag="101" translatesAutoresizingMaskIntoConstraints="NO" id="vnv-J2-7r1">
<rect key="frame" x="139" y="12" width="141" height="40"/> <rect key="frame" x="139" y="12" width="134" height="40"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="40" id="3WU-de-OQL"/> <constraint firstAttribute="height" constant="40" id="3WU-de-OQL"/>
<constraint firstAttribute="width" constant="137" id="cQV-gJ-zMz"/> <constraint firstAttribute="width" constant="130" id="cQV-gJ-zMz"/>
</constraints> </constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="left" placeholderString="23:46 AM" id="g8s-EU-UHx"> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" placeholderString="23:46 AM" id="g8s-EU-UHx">
<font key="font" size="27" name="Helvetica-Light"/> <font key="font" size="27" name="Helvetica-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
@ -104,7 +104,7 @@
<constraint firstItem="vnv-J2-7r1" firstAttribute="centerY" secondItem="qbN-ba-fho" secondAttribute="centerY" constant="-2" id="TuQ-gE-ZUh"/> <constraint firstItem="vnv-J2-7r1" firstAttribute="centerY" secondItem="qbN-ba-fho" secondAttribute="centerY" constant="-2" id="TuQ-gE-ZUh"/>
<constraint firstItem="QUd-7D-q14" firstAttribute="top" secondItem="etF-33-bCB" secondAttribute="bottom" constant="-5" id="VO6-Zn-eA3"/> <constraint firstItem="QUd-7D-q14" firstAttribute="top" secondItem="etF-33-bCB" secondAttribute="bottom" constant="-5" id="VO6-Zn-eA3"/>
<constraint firstItem="etF-33-bCB" firstAttribute="leading" secondItem="qbN-ba-fho" secondAttribute="leading" constant="10" id="ueW-ow-ZRq"/> <constraint firstItem="etF-33-bCB" firstAttribute="leading" secondItem="qbN-ba-fho" secondAttribute="leading" constant="10" id="ueW-ow-ZRq"/>
<constraint firstAttribute="trailing" secondItem="vnv-J2-7r1" secondAttribute="trailing" constant="1" id="zXo-eA-0bQ"/> <constraint firstAttribute="trailing" secondItem="vnv-J2-7r1" secondAttribute="trailing" constant="8" id="zXo-eA-0bQ"/>
</constraints> </constraints>
<connections> <connections>
<outlet property="customName" destination="etF-33-bCB" id="6Yz-qc-WmD"/> <outlet property="customName" destination="etF-33-bCB" id="6Yz-qc-WmD"/>

1
Clocker/PanelController.h

@ -73,5 +73,6 @@
- (void)closePanel; - (void)closePanel;
- (void)updateDefaultPreferences; - (void)updateDefaultPreferences;
- (void)showOptions:(BOOL)value; - (void)showOptions:(BOOL)value;
- (void)updateWindowTransparency;
@end @end

15
Clocker/PanelController.m

@ -82,6 +82,17 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell";
[self updateDefaultPreferences]; [self updateDefaultPreferences];
if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"defaultTheme"] isEqualToString:@"Black"]) {
self.shutdownButton.image = [NSImage imageNamed:@"PowerIcon-White"];
self.preferencesButton.image = [NSImage imageNamed:@"Settings-White"];
}
else
{
self.shutdownButton.image = [NSImage imageNamed:@"PowerIcon"];
self.preferencesButton.image = [NSImage imageNamed:NSImageNameActionTemplate];
}
[self updateDefaultPreferences];
self.mainTableview.selectionHighlightStyle = NSTableViewSelectionHighlightStyleNone; self.mainTableview.selectionHighlightStyle = NSTableViewSelectionHighlightStyleNone;
// Make a fully skinned panel // Make a fully skinned panel
@ -275,6 +286,10 @@ NSString *const CLTimezoneCellViewIdentifier = @"timeZoneCell";
return cellView; return cellView;
} }
if (row == self.defaultPreferences.count) {
[self updateWindowTransparency];
}
CLTimezoneCellView *cell = [tableView makeViewWithIdentifier:CLTimezoneCellViewIdentifier owner:self]; CLTimezoneCellView *cell = [tableView makeViewWithIdentifier:CLTimezoneCellViewIdentifier owner:self];
NSString *fontFamily = [[NSUserDefaults standardUserDefaults] objectForKey:@"defaultFontFamily"]; NSString *fontFamily = [[NSUserDefaults standardUserDefaults] objectForKey:@"defaultFontFamily"];

53
Clocker/Preferences/CLPreferencesView.xib

@ -20,11 +20,11 @@
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/> <customObject id="-3" userLabel="Application" customClass="NSObject"/>
<view id="Uu9-io-frR"> <view id="Uu9-io-frR">
<rect key="frame" x="0.0" y="0.0" width="439" height="460"/> <rect key="frame" x="0.0" y="0.0" width="439" height="430"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<button toolTip="Add a timezone" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4yB-vZ-tNX"> <button toolTip="Add a timezone" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="4yB-vZ-tNX">
<rect key="frame" x="11" y="154" width="21" height="22"/> <rect key="frame" x="11" y="124" width="21" height="22"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="20" id="GNz-C9-Ay8"/> <constraint firstAttribute="height" constant="20" id="GNz-C9-Ay8"/>
<constraint firstAttribute="width" constant="21" id="OkY-Uq-PwX"/> <constraint firstAttribute="width" constant="21" id="OkY-Uq-PwX"/>
@ -38,7 +38,7 @@
</connections> </connections>
</button> </button>
<button toolTip="Remove a timezone" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="iOG-Ey-lmD"> <button toolTip="Remove a timezone" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="iOG-Ey-lmD">
<rect key="frame" x="32" y="154" width="21" height="22"/> <rect key="frame" x="32" y="124" width="21" height="22"/>
<buttonCell key="cell" type="smallSquare" bezelStyle="smallSquare" image="NSRemoveTemplate" imagePosition="overlaps" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="gLH-wy-bCE"> <buttonCell key="cell" type="smallSquare" bezelStyle="smallSquare" image="NSRemoveTemplate" imagePosition="overlaps" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="gLH-wy-bCE">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/> <font key="font" metaFont="system"/>
@ -48,7 +48,7 @@
</connections> </connections>
</button> </button>
<scrollView focusRingType="none" borderType="none" autohidesScrollers="YES" horizontalLineScroll="22" horizontalPageScroll="10" verticalLineScroll="22" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zBR-OH-6QQ"> <scrollView focusRingType="none" borderType="none" autohidesScrollers="YES" horizontalLineScroll="22" horizontalPageScroll="10" verticalLineScroll="22" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zBR-OH-6QQ">
<rect key="frame" x="10" y="181" width="419" height="271"/> <rect key="frame" x="10" y="151" width="419" height="271"/>
<clipView key="contentView" id="UZ2-JA-TZe"> <clipView key="contentView" id="UZ2-JA-TZe">
<rect key="frame" x="0.0" y="0.0" width="419" height="271"/> <rect key="frame" x="0.0" y="0.0" width="419" height="271"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -109,7 +109,7 @@
</tableHeaderView> </tableHeaderView>
</scrollView> </scrollView>
<button toolTip="Clocker will start on each system launch" translatesAutoresizingMaskIntoConstraints="NO" id="i4I-JP-QcP" customClass="ColoredButton"> <button toolTip="Clocker will start on each system launch" translatesAutoresizingMaskIntoConstraints="NO" id="i4I-JP-QcP" customClass="ColoredButton">
<rect key="frame" x="167" y="106" width="191" height="18"/> <rect key="frame" x="167" y="76" width="191" height="18"/>
<buttonCell key="cell" type="check" title="Start Clocker on system startup" bezelStyle="regularSquare" imagePosition="left" inset="2" id="GSg-4f-ngw"> <buttonCell key="cell" type="check" title="Start Clocker on system startup" bezelStyle="regularSquare" imagePosition="left" inset="2" id="GSg-4f-ngw">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" size="12" name="Helvetica-Light"/> <font key="font" size="12" name="Helvetica-Light"/>
@ -119,7 +119,7 @@
</connections> </connections>
</button> </button>
<button toolTip="Show time using a 24-hour format" translatesAutoresizingMaskIntoConstraints="NO" id="msw-L5-agF" customClass="ColoredButton"> <button toolTip="Show time using a 24-hour format" translatesAutoresizingMaskIntoConstraints="NO" id="msw-L5-agF" customClass="ColoredButton">
<rect key="frame" x="167" y="127" width="343" height="22"/> <rect key="frame" x="167" y="97" width="343" height="22"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="339" id="KXG-qX-V3N"/> <constraint firstAttribute="width" constant="339" id="KXG-qX-V3N"/>
<constraint firstAttribute="height" constant="18" id="d60-FM-DPd"/> <constraint firstAttribute="height" constant="18" id="d60-FM-DPd"/>
@ -134,7 +134,7 @@
</connections> </connections>
</button> </button>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="adA-dB-5Ok"> <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="adA-dB-5Ok">
<rect key="frame" x="167" y="47" width="179" height="26"/> <rect key="frame" x="167" y="17" width="179" height="26"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="174" id="Iav-7m-gZ5"/> <constraint firstAttribute="width" constant="174" id="Iav-7m-gZ5"/>
</constraints> </constraints>
@ -156,7 +156,7 @@
</connections> </connections>
</popUpButton> </popUpButton>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="sfL-D2-aUX"> <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="sfL-D2-aUX">
<rect key="frame" x="167" y="75" width="179" height="26"/> <rect key="frame" x="167" y="45" width="179" height="26"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="174" id="AQn-7i-cfu"/> <constraint firstAttribute="width" constant="174" id="AQn-7i-cfu"/>
</constraints> </constraints>
@ -178,7 +178,7 @@
</connections> </connections>
</popUpButton> </popUpButton>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wtb-He-7BA"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wtb-He-7BA">
<rect key="frame" x="95" y="51" width="64" height="19"/> <rect key="frame" x="95" y="21" width="64" height="19"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="60" id="Whm-eI-Qun"/> <constraint firstAttribute="width" constant="60" id="Whm-eI-Qun"/>
</constraints> </constraints>
@ -188,27 +188,8 @@
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell> </textFieldCell>
</textField> </textField>
<slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="O5B-d7-PCv">
<rect key="frame" x="167" y="18" width="178" height="25"/>
<constraints>
<constraint firstAttribute="width" constant="174" id="kRc-ia-rK2"/>
<constraint firstAttribute="height" constant="23" id="kms-1V-OhO"/>
</constraints>
<sliderCell key="cell" state="on" alignment="left" minValue="50" maxValue="100" doubleValue="100" tickMarkPosition="above" numberOfTickMarks="10" sliderType="linear" id="fMg-bG-aoC"/>
<connections>
<action selector="changeTransparency:" target="-2" id="OT6-WO-Y0P"/>
</connections>
</slider>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="U8n-2q-SGh">
<rect key="frame" x="85" y="21" width="77" height="19"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Transparency:" id="1cy-6f-zq4">
<font key="font" size="12" name="HelveticaNeue-Light"/>
<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="RVw-E8-jnc"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="RVw-E8-jnc">
<rect key="frame" x="119" y="79" width="43" height="19"/> <rect key="frame" x="119" y="49" width="43" height="19"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Theme:" id="Fxt-Z4-w4Z"> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Theme:" id="Fxt-Z4-w4Z">
<font key="font" size="12" name="HelveticaNeue-Light"/> <font key="font" size="12" name="HelveticaNeue-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -216,7 +197,7 @@
</textFieldCell> </textFieldCell>
</textField> </textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Dx5-9L-nPB"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Dx5-9L-nPB">
<rect key="frame" x="113" y="106" width="46" height="19"/> <rect key="frame" x="113" y="76" width="46" height="19"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Launch:" id="AYA-cO-ArR"> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Launch:" id="AYA-cO-ArR">
<font key="font" size="12" name="HelveticaNeue-Light"/> <font key="font" size="12" name="HelveticaNeue-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -224,7 +205,7 @@
</textFieldCell> </textFieldCell>
</textField> </textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="EdZ-8X-JQg"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="EdZ-8X-JQg">
<rect key="frame" x="86" y="129" width="73" height="19"/> <rect key="frame" x="86" y="99" width="73" height="19"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Time Format:" id="KxG-3S-ZCz"> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Time Format:" id="KxG-3S-ZCz">
<font key="font" size="12" name="HelveticaNeue-Light"/> <font key="font" size="12" name="HelveticaNeue-Light"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -233,24 +214,20 @@
</textField> </textField>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstAttribute="bottom" secondItem="U8n-2q-SGh" secondAttribute="bottom" constant="21" id="1E4-CQ-9dG"/>
<constraint firstItem="sfL-D2-aUX" firstAttribute="top" secondItem="i4I-JP-QcP" secondAttribute="bottom" constant="9" id="7cF-n8-BQL"/> <constraint firstItem="sfL-D2-aUX" firstAttribute="top" secondItem="i4I-JP-QcP" secondAttribute="bottom" constant="9" id="7cF-n8-BQL"/>
<constraint firstItem="adA-dB-5Ok" firstAttribute="top" secondItem="sfL-D2-aUX" secondAttribute="bottom" constant="7" id="8lc-ds-Esz"/> <constraint firstItem="adA-dB-5Ok" firstAttribute="top" secondItem="sfL-D2-aUX" secondAttribute="bottom" constant="7" id="8lc-ds-Esz"/>
<constraint firstAttribute="bottom" secondItem="wtb-He-7BA" secondAttribute="bottom" constant="21" id="ABT-bI-1fr"/>
<constraint firstItem="Dx5-9L-nPB" firstAttribute="leading" secondItem="Uu9-io-frR" secondAttribute="leading" constant="115" id="BV7-hK-dBd"/> <constraint firstItem="Dx5-9L-nPB" firstAttribute="leading" secondItem="Uu9-io-frR" secondAttribute="leading" constant="115" id="BV7-hK-dBd"/>
<constraint firstItem="msw-L5-agF" firstAttribute="top" secondItem="4yB-vZ-tNX" secondAttribute="bottom" constant="8" id="CnR-dg-KfG"/> <constraint firstItem="msw-L5-agF" firstAttribute="top" secondItem="4yB-vZ-tNX" secondAttribute="bottom" constant="8" id="CnR-dg-KfG"/>
<constraint firstItem="iOG-Ey-lmD" firstAttribute="height" secondItem="4yB-vZ-tNX" secondAttribute="height" id="HKt-is-5y3"/> <constraint firstItem="iOG-Ey-lmD" firstAttribute="height" secondItem="4yB-vZ-tNX" secondAttribute="height" id="HKt-is-5y3"/>
<constraint firstAttribute="bottom" secondItem="O5B-d7-PCv" secondAttribute="bottom" constant="20" id="HkH-bC-aJN"/>
<constraint firstItem="zBR-OH-6QQ" firstAttribute="top" secondItem="Uu9-io-frR" secondAttribute="top" constant="8" id="JKn-gF-8oI"/> <constraint firstItem="zBR-OH-6QQ" firstAttribute="top" secondItem="Uu9-io-frR" secondAttribute="top" constant="8" id="JKn-gF-8oI"/>
<constraint firstItem="O5B-d7-PCv" firstAttribute="leading" secondItem="U8n-2q-SGh" secondAttribute="trailing" constant="9" id="MuT-RY-fw8"/>
<constraint firstItem="U8n-2q-SGh" firstAttribute="leading" secondItem="Uu9-io-frR" secondAttribute="leading" constant="87" id="OiS-VT-dFr"/>
<constraint firstItem="i4I-JP-QcP" firstAttribute="leading" secondItem="Uu9-io-frR" secondAttribute="leading" constant="169" id="QAx-JY-Iyc"/> <constraint firstItem="i4I-JP-QcP" firstAttribute="leading" secondItem="Uu9-io-frR" secondAttribute="leading" constant="169" id="QAx-JY-Iyc"/>
<constraint firstItem="O5B-d7-PCv" firstAttribute="top" secondItem="adA-dB-5Ok" secondAttribute="bottom" constant="7" id="UFV-Pv-6wo"/>
<constraint firstItem="Dx5-9L-nPB" firstAttribute="top" secondItem="EdZ-8X-JQg" secondAttribute="bottom" constant="4" id="Udf-Cm-OWA"/> <constraint firstItem="Dx5-9L-nPB" firstAttribute="top" secondItem="EdZ-8X-JQg" secondAttribute="bottom" constant="4" id="Udf-Cm-OWA"/>
<constraint firstItem="msw-L5-agF" firstAttribute="top" secondItem="iOG-Ey-lmD" secondAttribute="bottom" constant="8" id="Umd-Jo-VZj"/> <constraint firstItem="msw-L5-agF" firstAttribute="top" secondItem="iOG-Ey-lmD" secondAttribute="bottom" constant="8" id="Umd-Jo-VZj"/>
<constraint firstItem="4yB-vZ-tNX" firstAttribute="top" secondItem="zBR-OH-6QQ" secondAttribute="bottom" constant="6" id="Zsk-85-aI8"/> <constraint firstItem="4yB-vZ-tNX" firstAttribute="top" secondItem="zBR-OH-6QQ" secondAttribute="bottom" constant="6" id="Zsk-85-aI8"/>
<constraint firstItem="RVw-E8-jnc" firstAttribute="leading" secondItem="Uu9-io-frR" secondAttribute="leading" constant="121" id="dyX-Sd-50z"/> <constraint firstItem="RVw-E8-jnc" firstAttribute="leading" secondItem="Uu9-io-frR" secondAttribute="leading" constant="121" id="dyX-Sd-50z"/>
<constraint firstAttribute="bottom" secondItem="adA-dB-5Ok" secondAttribute="bottom" constant="20" id="fZs-aV-AJw"/>
<constraint firstItem="sfL-D2-aUX" firstAttribute="leading" secondItem="RVw-E8-jnc" secondAttribute="trailing" constant="9" id="fzk-AD-jKY"/> <constraint firstItem="sfL-D2-aUX" firstAttribute="leading" secondItem="RVw-E8-jnc" secondAttribute="trailing" constant="9" id="fzk-AD-jKY"/>
<constraint firstItem="U8n-2q-SGh" firstAttribute="top" secondItem="wtb-He-7BA" secondAttribute="bottom" constant="11" id="hxN-Pq-cUq"/>
<constraint firstItem="wtb-He-7BA" firstAttribute="leading" secondItem="Uu9-io-frR" secondAttribute="leading" constant="97" id="im6-yj-x5a"/> <constraint firstItem="wtb-He-7BA" firstAttribute="leading" secondItem="Uu9-io-frR" secondAttribute="leading" constant="97" id="im6-yj-x5a"/>
<constraint firstItem="adA-dB-5Ok" firstAttribute="leading" secondItem="wtb-He-7BA" secondAttribute="trailing" constant="12" id="l3q-0l-VaZ"/> <constraint firstItem="adA-dB-5Ok" firstAttribute="leading" secondItem="wtb-He-7BA" secondAttribute="trailing" constant="12" id="l3q-0l-VaZ"/>
<constraint firstItem="RVw-E8-jnc" firstAttribute="top" secondItem="Dx5-9L-nPB" secondAttribute="bottom" constant="8" id="mcI-AG-tvu"/> <constraint firstItem="RVw-E8-jnc" firstAttribute="top" secondItem="Dx5-9L-nPB" secondAttribute="bottom" constant="8" id="mcI-AG-tvu"/>
@ -264,7 +241,7 @@
<constraint firstItem="4yB-vZ-tNX" firstAttribute="leading" secondItem="Uu9-io-frR" secondAttribute="leading" constant="11" id="zgB-PO-97r"/> <constraint firstItem="4yB-vZ-tNX" firstAttribute="leading" secondItem="Uu9-io-frR" secondAttribute="leading" constant="11" id="zgB-PO-97r"/>
<constraint firstItem="zBR-OH-6QQ" firstAttribute="leading" secondItem="Uu9-io-frR" secondAttribute="leading" constant="10" id="zoH-62-nam"/> <constraint firstItem="zBR-OH-6QQ" firstAttribute="leading" secondItem="Uu9-io-frR" secondAttribute="leading" constant="10" id="zoH-62-nam"/>
</constraints> </constraints>
<point key="canvasLocation" x="295.5" y="236"/> <point key="canvasLocation" x="295.5" y="221"/>
</view> </view>
<userDefaultsController representsSharedInstance="YES" id="1Gq-ZQ-IML"/> <userDefaultsController representsSharedInstance="YES" id="1Gq-ZQ-IML"/>
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" hasShadow="NO" hidesOnDeactivate="YES" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="alertPanel" appearanceType="aqua" frameAutosaveName="" id="6FL-fp-Ke1" customClass="Panel"> <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" hasShadow="NO" hidesOnDeactivate="YES" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="alertPanel" appearanceType="aqua" frameAutosaveName="" id="6FL-fp-Ke1" customClass="Panel">

17
Clocker/Preferences/CLPreferencesViewController.m

@ -31,6 +31,7 @@ NSString *const CLPreferencesAvailableTimezoneIdentifier = @"availableTimezones"
@property (weak) IBOutlet NSButton *is24HourFormatSelected; @property (weak) IBOutlet NSButton *is24HourFormatSelected;
@property (weak) IBOutlet NSTextField *messageLabel; @property (weak) IBOutlet NSTextField *messageLabel;
@property (weak) IBOutlet NSSlider *transparencySlider;
@end @end
@implementation CLPreferencesViewController @implementation CLPreferencesViewController
@ -77,7 +78,7 @@ NSString *const CLPreferencesAvailableTimezoneIdentifier = @"availableTimezones"
//Certain fonts don't look good with constraints set //Certain fonts don't look good with constraints set
NSArray *fontsToRemove = [NSArray arrayWithObjects:@"Apple Chancery", @"Zapfino", NSArray *fontsToRemove = [NSArray arrayWithObjects:@"Apple Chancery", @"Zapfino",
@"Trattatello", @"Noteworthy", @"Arial Black", @"Chalkduster",@"Monoid", nil]; @"Trattatello", @"Noteworthy", @"Arial Black", @"Chalkduster",@"Monoid", @"Andale Mono", @"Courier" ,@"Courier New",@"Geneva",@"Menlo", @"Monaco",@"PT Mono", @"Verdana", nil];
for (NSString *font in fontsToRemove) { for (NSString *font in fontsToRemove) {
if([availableFonts containsObject:font]) if([availableFonts containsObject:font])
{ {
@ -449,29 +450,21 @@ NSString *const CLPreferencesAvailableTimezoneIdentifier = @"availableTimezones"
PanelController *panelController = appDelegate.panelController; PanelController *panelController = appDelegate.panelController;
[panelController.backgroundView setNeedsDisplay:YES]; [panelController.backgroundView setNeedsDisplay:YES];
if ([[popUpButtonTitle titleOfSelectedItem] isEqualToString:@"Black"]) { if ([[popUpButtonTitle titleOfSelectedItem] isEqualToString:@"Black"]) {
panelController.shutdownButton.image = [NSImage imageNamed:@"PowerIcon-White"]; panelController.shutdownButton.image = [NSImage imageNamed:@"PowerIcon-White"];
panelController.preferencesButton.image = [NSImage imageNamed:@"Settings-White"];
} }
else else
{ {
panelController.shutdownButton.image = [NSImage imageNamed:@"PowerIcon"]; panelController.shutdownButton.image = [NSImage imageNamed:@"PowerIcon"];
panelController.preferencesButton.image = [NSImage imageNamed:NSImageNameActionTemplate];
} }
[panelController.mainTableview reloadData]; [panelController.mainTableview reloadData];
} }
- (IBAction)changeTransparency:(id)sender
{
ApplicationDelegate *appDelegate = [[NSApplication sharedApplication] delegate];
PanelController *panelController = appDelegate.panelController;
NSSlider *slider = (NSSlider *)sender;
[NSAnimationContext beginGrouping];
[[NSAnimationContext currentContext] setDuration:0.10];
[[panelController.window animator] setAlphaValue:slider.floatValue/100];
[NSAnimationContext endGrouping];
}
@end @end

2
Media.xcassets/PowerIcon-White.imageset/Contents.json vendored

@ -2,7 +2,7 @@
"images" : [ "images" : [
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "PowerIcon-White.png", "filename" : "PowerIcon-Whitw2.png",
"scale" : "1x" "scale" : "1x"
}, },
{ {

BIN
Media.xcassets/PowerIcon-White.imageset/PowerIcon-White.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

BIN
Media.xcassets/PowerIcon-White.imageset/PowerIcon-Whitw2.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

21
Media.xcassets/Settings-White.imageset/Contents.json vendored

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Settings-White.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

BIN
Media.xcassets/Settings-White.imageset/Settings-White.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

21
Media.xcassets/WhiteButton.imageset/Contents.json vendored

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "WhiteButton.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

BIN
Media.xcassets/WhiteButton.imageset/WhiteButton.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Loading…
Cancel
Save