Browse Source

Minor changes.

v1.2.4
Abhishek Banthia 8 years ago
parent
commit
f2d6c9deea
  1. 47
      Clocker/Onboarding/CLOnboardingWindowController.m
  2. 44
      Clocker/Onboarding/en.lproj/CLOnboardingWindow.xib
  3. 1
      Clocker/Preferences/CLPreferencesViewController.h
  4. 18
      Clocker/Preferences/en.lproj/CLPreferencesView.xib

47
Clocker/Onboarding/CLOnboardingWindowController.m

@ -10,10 +10,11 @@
#import <QuartzCore/QuartzCore.h>
#import <pop/POP.h>
@interface CLOnboardingWindowController ()
@property (weak) IBOutlet NSTextField *titleLabel;
@property (weak) IBOutlet NSButton *continueButtonOutlet;
@property (strong, nonatomic) CLIntroViewController *introViewController;
@end
@ -22,19 +23,14 @@ static CLOnboardingWindowController *sharedOnboardingWindow;
@implementation CLOnboardingWindowController
- (void)windowDidLoad {
- (void)windowDidLoad
{
[super windowDidLoad];
self.window.backgroundColor = [NSColor whiteColor];
self.window.titleVisibility = NSWindowTitleHidden;
POPSpringAnimation *shake = [POPSpringAnimation animationWithPropertyNamed:kPOPLayerPositionX];
shake.springBounciness = 35;
shake.velocity = @(1000);
[self.titleLabel.layer pop_addAnimation:shake forKey:@"shakePassword"];
// Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
}
@ -49,16 +45,45 @@ static CLOnboardingWindowController *sharedOnboardingWindow;
});
}
return sharedOnboardingWindow;
}
- (IBAction)continueButtonPressed:(id)sender
{
self.introViewController = [[CLIntroViewController alloc] initWithNibName:@"CLIntroView" bundle:nil];
[[self.window animator] setContentSize:self.introViewController.view.frame.size];
[[self.window animator] setContentView:self.introViewController.view];
self.introViewController = [[CLIntroViewController alloc]
initWithNibName:@"CLIntroView" bundle:nil];
CGRect oldFrame = self.window.frame;
CGRect newFrame = self.introViewController.view.frame;
[self performBoundsAnimationWithOldRect:oldFrame andNewRect:newFrame];
}
- (void)performBoundsAnimationWithOldRect:(CGRect)fromRect andNewRect:(CGRect)newRect
{
[self.window setFrame:fromRect display:NO animate:NO];
self.window.contentView.wantsLayer = YES;
POPSpringAnimation *anim = [POPSpringAnimation animationWithPropertyNamed:kPOPViewBounds];
anim.toValue = [NSValue valueWithCGRect:newRect];
anim.springSpeed = 1;
[self.window.contentView.layer pop_addAnimation:anim forKey:@"popBounds"];
[self.window setContentSize:self.introViewController.view.frame.size];
[self.window setContentView:self.introViewController.view];
}
@end

44
Clocker/Onboarding/en.lproj/CLOnboardingWindow.xib

@ -13,18 +13,18 @@
</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">
<window title="Clocker" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5">
<windowStyleMask key="styleMask" titled="YES" closable="YES"/>
<rect key="contentRect" x="196" y="240" width="538" height="420"/>
<rect key="contentRect" x="196" y="240" width="440" height="411"/>
<rect key="screenRect" x="0.0" y="0.0" width="1280" height="777"/>
<value key="minSize" type="size" width="538" height="420"/>
<value key="maxSize" type="size" width="538" height="420"/>
<value key="minSize" type="size" width="440" height="411"/>
<value key="maxSize" type="size" width="440" height="411"/>
<view key="contentView" id="se5-gp-TjO">
<rect key="frame" x="0.0" y="0.0" width="538" height="420"/>
<rect key="frame" x="0.0" y="0.0" width="440" height="411"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="TaQ-Ln-Vip">
<rect key="frame" x="169" y="190" width="200" height="200"/>
<rect key="frame" x="120" y="181" width="200" height="200"/>
<constraints>
<constraint firstAttribute="width" constant="200" id="Ll6-ju-UBQ"/>
<constraint firstAttribute="height" constant="200" id="kpd-df-Kmk"/>
@ -32,36 +32,36 @@
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="ClockerIcon-512" id="2t2-AF-Gtf"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oiI-iN-JcW">
<rect key="frame" x="18" y="125" width="502" height="60"/>
<rect key="frame" x="18" y="126" width="404" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="C7v-6N-7K9"/>
<constraint firstAttribute="height" constant="50" id="C7v-6N-7K9"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Clocker" id="r8V-tn-VkN">
<font key="font" size="35" name="SFUIDisplay-Bold"/>
<font key="font" size="35" name="HelveticaNeue"/>
<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="oyE-6j-Mni">
<rect key="frame" x="18" y="11" width="502" height="17"/>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" preferredMaxLayoutWidth="400" translatesAutoresizingMaskIntoConstraints="NO" id="oyE-6j-Mni">
<rect key="frame" x="18" y="11" width="404" height="17"/>
<constraints>
<constraint firstAttribute="height" constant="17" id="Ttg-Xe-RUI"/>
</constraints>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" placeholderString="Made by Abhishek Banthia" id="cdT-3T-Jmu">
<font key="font" size="11" name="SFUIDisplay-Light"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Made by Abhishek Banthia" placeholderString="" id="cdT-3T-Jmu">
<font key="font" size="11" name="HelveticaNeue"/>
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MQa-AK-s2j" customClass="CLScaleUpButton">
<rect key="frame" x="212" y="27" width="114" height="36"/>
<button focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MQa-AK-s2j">
<rect key="frame" x="163" y="27" width="114" height="33"/>
<constraints>
<constraint firstAttribute="width" constant="102" id="17K-x2-WJw"/>
<constraint firstAttribute="height" constant="25" id="uWT-Rz-CCE"/>
<constraint firstAttribute="height" constant="22" id="uWT-Rz-CCE"/>
</constraints>
<buttonCell key="cell" type="push" title="Continue" bezelStyle="rounded" alignment="center" borderStyle="border" focusRingType="none" imageScaling="proportionallyDown" inset="2" id="TjC-Ot-oen">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<font key="font" size="13" name="SFUIDisplay-Light"/>
<string key="keyEquivalent" base64-UTF8="YES">
DQ
</string>
@ -76,9 +76,9 @@ DQ
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wod-xv-dtj">
<rect key="frame" x="18" y="99" width="502" height="24"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Your timezone manager!" id="hQe-Z5-uca">
<font key="font" size="16" name="SFUIDisplay-Light"/>
<rect key="frame" x="18" y="103" width="404" height="23"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Here's how you can make the most of Clocker..." placeholderString="" id="hQe-Z5-uca">
<font key="font" size="16" name="HelveticaNeue-Thin"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
@ -92,7 +92,7 @@ DQ
<constraint firstItem="TaQ-Ln-Vip" firstAttribute="top" secondItem="se5-gp-TjO" secondAttribute="top" constant="30" id="MAA-ac-ceo"/>
<constraint firstItem="oyE-6j-Mni" firstAttribute="top" secondItem="MQa-AK-s2j" secondAttribute="bottom" constant="6" id="U8v-lf-N46"/>
<constraint firstItem="oiI-iN-JcW" firstAttribute="leading" secondItem="se5-gp-TjO" secondAttribute="leading" constant="20" id="ajN-5l-kDS"/>
<constraint firstItem="wod-xv-dtj" firstAttribute="top" secondItem="oiI-iN-JcW" secondAttribute="bottom" constant="2" id="bed-o9-FYi"/>
<constraint firstItem="wod-xv-dtj" firstAttribute="top" secondItem="oiI-iN-JcW" secondAttribute="bottom" id="bed-o9-FYi"/>
<constraint firstItem="wod-xv-dtj" firstAttribute="centerX" secondItem="se5-gp-TjO" secondAttribute="centerX" id="bm9-w8-ea0"/>
<constraint firstItem="TaQ-Ln-Vip" firstAttribute="centerX" secondItem="se5-gp-TjO" secondAttribute="centerX" id="dV9-LG-Mh6"/>
<constraint firstAttribute="bottom" secondItem="oyE-6j-Mni" secondAttribute="bottom" constant="11" id="fGG-Ao-iJ2"/>
@ -105,7 +105,7 @@ DQ
<connections>
<outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
</connections>
<point key="canvasLocation" x="300" y="133"/>
<point key="canvasLocation" x="300" y="95.5"/>
</window>
</objects>
<resources>

1
Clocker/Preferences/CLPreferencesViewController.h

@ -21,5 +21,6 @@ typedef enum : NSUInteger {
- (void)refereshTimezoneTableView;
- (IBAction)addTimeZone:(id)sender;
@end

18
Clocker/Preferences/en.lproj/CLPreferencesView.xib

@ -220,28 +220,34 @@ CA
</connections>
</progressIndicator>
<button toolTip="Close Panel" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cyZ-cL-S7a">
<rect key="frame" x="50" y="4" width="50" height="19"/>
<rect key="frame" x="44" y="-2" width="62" height="29"/>
<constraints>
<constraint firstAttribute="height" constant="18" id="lku-Qx-nX5"/>
<constraint firstAttribute="width" constant="50" id="vqo-37-082"/>
</constraints>
<buttonCell key="cell" type="roundRect" title="Close" bezelStyle="roundedRect" imagePosition="left" alignment="center" borderStyle="border" inset="2" id="YjP-c4-vTl">
<buttonCell key="cell" type="push" title="Close" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="YjP-c4-vTl">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" size="12" name="SFUIDisplay-Light"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent" base64-UTF8="YES">
Gw
</string>
</buttonCell>
<connections>
<action selector="closePanel:" target="-2" id="YRs-VA-eFr"/>
</connections>
</button>
<button toolTip="Add a timezone" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hp6-CH-WJs">
<rect key="frame" x="8" y="4" width="40" height="19"/>
<rect key="frame" x="2" y="-2" width="52" height="29"/>
<constraints>
<constraint firstAttribute="height" constant="18" id="r2L-5O-GZy"/>
<constraint firstAttribute="width" constant="40" id="yuH-LM-RAy"/>
</constraints>
<buttonCell key="cell" type="roundRect" title="Add" bezelStyle="roundedRect" imagePosition="left" alignment="center" borderStyle="border" inset="2" id="x6l-8x-qnu">
<buttonCell key="cell" type="push" title="Add" bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="x6l-8x-qnu">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" size="12" name="SFUIDisplay-Light"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent" base64-UTF8="YES">
DQ
</string>
</buttonCell>
<connections>
<action selector="addToFavorites:" target="-2" id="Mdg-7P-kDy"/>

Loading…
Cancel
Save