Skip to content

Commit

Permalink
New loading animation; fix release script typo. [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
camsaul committed Oct 14, 2015
1 parent b01ca55 commit e269997
Show file tree
Hide file tree
Showing 12 changed files with 188 additions and 77 deletions.
22 changes: 18 additions & 4 deletions OSX/Metabase.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
D105B23F1BB5BE4A00A5D850 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = D105B2361BB5BE4A00A5D850 /* [email protected] */; };
D105B2401BB5BE4A00A5D850 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = D105B2371BB5BE4A00A5D850 /* [email protected] */; };
D105B2411BB5BE4A00A5D850 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = D105B2381BB5BE4A00A5D850 /* [email protected] */; };
D105B2421BB5BE4A00A5D850 /* Logo_1024.png in Resources */ = {isa = PBXBuildFile; fileRef = D105B2391BB5BE4A00A5D850 /* Logo_1024.png */; };
D105B2431BB5BE4A00A5D850 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = D105B23A1BB5BE4A00A5D850 /* [email protected] */; };
D105B2441BB5BE4A00A5D850 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = D105B23B1BB5BE4A00A5D850 /* [email protected] */; };
D121FD651BC5B2AF002101B0 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D121FD641BC5B2AF002101B0 /* Sparkle.framework */; };
Expand All @@ -40,6 +39,10 @@
D18853F91BB0D37C00D89803 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D18853F81BB0D37B00D89803 /* WebKit.framework */; };
D18854041BB0DC2600D89803 /* metabase.jar in Resources */ = {isa = PBXBuildFile; fileRef = D18854021BB0DB6000D89803 /* metabase.jar */; };
D18855611BB1C8D700D89803 /* jre in Resources */ = {isa = PBXBuildFile; fileRef = D188555E1BB1C86F00D89803 /* jre */; };
D1CB9FE81BCEDE9A009A61FB /* LoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = D1CB9FE71BCEDE9A009A61FB /* LoadingView.m */; };
D1CB9FEA1BCEDEA5009A61FB /* LoadingView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D1CB9FE91BCEDEA5009A61FB /* LoadingView.xib */; };
D1CB9FED1BCEDF02009A61FB /* Loading_View_Inner.png in Resources */ = {isa = PBXBuildFile; fileRef = D1CB9FEB1BCEDF02009A61FB /* Loading_View_Inner.png */; };
D1CB9FEE1BCEDF02009A61FB /* Loading_View_Outer.png in Resources */ = {isa = PBXBuildFile; fileRef = D1CB9FEC1BCEDF02009A61FB /* Loading_View_Outer.png */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -83,7 +86,6 @@
D105B2361BB5BE4A00A5D850 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
D105B2371BB5BE4A00A5D850 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
D105B2381BB5BE4A00A5D850 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
D105B2391BB5BE4A00A5D850 /* Logo_1024.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Logo_1024.png; sourceTree = "<group>"; };
D105B23A1BB5BE4A00A5D850 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
D105B23B1BB5BE4A00A5D850 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
D121FD641BC5B2AF002101B0 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = "<group>"; };
Expand Down Expand Up @@ -115,6 +117,11 @@
D18853F81BB0D37B00D89803 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
D18854021BB0DB6000D89803 /* metabase.jar */ = {isa = PBXFileReference; lastKnownFileType = archive.jar; path = metabase.jar; sourceTree = "<group>"; };
D188555E1BB1C86F00D89803 /* jre */ = {isa = PBXFileReference; lastKnownFileType = folder; name = jre; path = Metabase/jre; sourceTree = "<group>"; };
D1CB9FE61BCEDE9A009A61FB /* LoadingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoadingView.h; sourceTree = "<group>"; };
D1CB9FE71BCEDE9A009A61FB /* LoadingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoadingView.m; sourceTree = "<group>"; };
D1CB9FE91BCEDEA5009A61FB /* LoadingView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LoadingView.xib; sourceTree = "<group>"; };
D1CB9FEB1BCEDF02009A61FB /* Loading_View_Inner.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Loading_View_Inner.png; sourceTree = "<group>"; };
D1CB9FEC1BCEDF02009A61FB /* Loading_View_Outer.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Loading_View_Outer.png; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -186,13 +193,14 @@
D105B2321BB5BE4A00A5D850 /* Images */ = {
isa = PBXGroup;
children = (
D1CB9FEB1BCEDF02009A61FB /* Loading_View_Inner.png */,
D1CB9FEC1BCEDF02009A61FB /* Loading_View_Outer.png */,
D105B2331BB5BE4A00A5D850 /* [email protected] */,
D105B2341BB5BE4A00A5D850 /* [email protected] */,
D105B2351BB5BE4A00A5D850 /* [email protected] */,
D105B2361BB5BE4A00A5D850 /* [email protected] */,
D105B2371BB5BE4A00A5D850 /* [email protected] */,
D105B2381BB5BE4A00A5D850 /* [email protected] */,
D105B2391BB5BE4A00A5D850 /* Logo_1024.png */,
D105B23A1BB5BE4A00A5D850 /* [email protected] */,
D105B23B1BB5BE4A00A5D850 /* [email protected] */,
);
Expand Down Expand Up @@ -228,6 +236,9 @@
D162C4A51BC87D2B009F678F /* MainMenu.xib */,
D162C4A61BC87D2B009F678F /* MainViewController.h */,
D162C4A71BC87D2B009F678F /* MainViewController.m */,
D1CB9FE61BCEDE9A009A61FB /* LoadingView.h */,
D1CB9FE71BCEDE9A009A61FB /* LoadingView.m */,
D1CB9FE91BCEDEA5009A61FB /* LoadingView.xib */,
);
path = UI;
sourceTree = "<group>";
Expand Down Expand Up @@ -388,6 +399,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D1CB9FEE1BCEDF02009A61FB /* Loading_View_Outer.png in Resources */,
D105B23D1BB5BE4A00A5D850 /* [email protected] in Resources */,
D121FD691BC5B4E7002101B0 /* dsa_pub.pem in Resources */,
D18855611BB1C8D700D89803 /* jre in Resources */,
Expand All @@ -399,9 +411,10 @@
D105B23F1BB5BE4A00A5D850 /* [email protected] in Resources */,
D18853D71BB0CEC600D89803 /* Images.xcassets in Resources */,
D105B23E1BB5BE4A00A5D850 /* [email protected] in Resources */,
D1CB9FEA1BCEDEA5009A61FB /* LoadingView.xib in Resources */,
D1CB9FED1BCEDF02009A61FB /* Loading_View_Inner.png in Resources */,
D105B23C1BB5BE4A00A5D850 /* [email protected] in Resources */,
D18853CF1BB0CEC600D89803 /* Credits.rtf in Resources */,
D105B2421BB5BE4A00A5D850 /* Logo_1024.png in Resources */,
D105B2411BB5BE4A00A5D850 /* [email protected] in Resources */,
D105B2441BB5BE4A00A5D850 /* [email protected] in Resources */,
);
Expand Down Expand Up @@ -439,6 +452,7 @@
buildActionMask = 2147483647;
files = (
D162C4AB1BC87D2B009F678F /* TaskHealthChecker.m in Sources */,
D1CB9FE81BCEDE9A009A61FB /* LoadingView.m in Sources */,
D105B2261BB378C100A5D850 /* NSDocument+INAppStoreWindowFixes.m in Sources */,
D162C4AA1BC87D2B009F678F /* SettingsManager.m in Sources */,
D105B2251BB378C100A5D850 /* INWindowBackgroundView+CoreUIRendering.m in Sources */,
Expand Down
4 changes: 2 additions & 2 deletions OSX/Metabase/Metabase-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.11.3.14</string>
<string>0.11.3.18</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.11.3.14</string>
<string>0.11.3.18</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
15 changes: 15 additions & 0 deletions OSX/Metabase/UI/LoadingView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// LoadingView.h
// Metabase
//
// Created by Cam Saul on 10/14/15.
// Copyright (c) 2015 Metabase. All rights reserved.
//

@import Cocoa;

@interface LoadingView : NSView

@property (nonatomic) BOOL animate;

@end
58 changes: 58 additions & 0 deletions OSX/Metabase/UI/LoadingView.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
//
// LoadingView.m
// Metabase
//
// Created by Cam Saul on 10/14/15.
// Copyright (c) 2015 Metabase. All rights reserved.
//

@import QuartzCore;

#import "LoadingView.h"

@interface LoadingView ()
@property (weak) IBOutlet NSImageView *outerImageView;
@end

@implementation LoadingView

#pragma mark - Lifecycle

- (instancetype)init {
NSArray *objects;
[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:nil topLevelObjects:&objects];
for (id obj in objects) {
if ([obj isMemberOfClass:[self class]]) return obj;
}
return nil;
}

- (void)awakeFromNib {
self.outerImageView.wantsLayer = YES;
}


#pragma mark - Getters / Setters

- (void)setAnimate:(BOOL)animate {
if (_animate == animate) return;

_animate = animate;

if (!animate) {
[self.outerImageView.layer removeAllAnimations];
} else {
self.outerImageView.layer.position = CGPointMake(CGRectGetMidX(self.bounds), CGRectGetMidY(self.bounds));
self.outerImageView.layer.anchorPoint = CGPointMake(0.5f, 0.5f);

CABasicAnimation *rotation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
rotation.fromValue = @0.0f;
rotation.toValue = @(M_PI * 2.0f);
rotation.duration = 2.0f;
rotation.repeatCount = HUGE_VALF;

[self.outerImageView.layer addAnimation:rotation forKey:@"rotation"];
}
}

@end
48 changes: 48 additions & 0 deletions OSX/Metabase/UI/LoadingView.xib
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5053" systemVersion="13A603" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5053"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner"/>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application"/>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="c22-O7-iKe" customClass="LoadingView">
<rect key="frame" x="0.0" y="0.0" width="200" height="200"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<imageView canDrawConcurrently="YES" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="cZb-9N-gBv" userLabel="outerImageView">
<rect key="frame" x="6" y="6" width="188" height="188"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<constraints>
<constraint firstAttribute="width" constant="188" id="rhk-Jv-lfh"/>
<constraint firstAttribute="height" constant="188" id="zc5-5V-71M"/>
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" animates="YES" image="Loading_View_Outer" id="gdw-zk-O24"/>
</imageView>
<imageView canDrawConcurrently="YES" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Ppb-yU-gW5" userLabel="innerImageView">
<rect key="frame" x="40" y="40" width="121" height="121"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<constraints>
<constraint firstAttribute="height" constant="121" id="pAT-Hi-rz9"/>
<constraint firstAttribute="width" constant="121" id="zrZ-xr-I0a"/>
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" animates="YES" image="Loading_View_Inner" id="umY-yg-KA6"/>
</imageView>
</subviews>
<constraints>
<constraint firstAttribute="centerY" secondItem="Ppb-yU-gW5" secondAttribute="centerY" id="DZe-EF-QxD"/>
<constraint firstAttribute="centerX" secondItem="Ppb-yU-gW5" secondAttribute="centerX" id="Xtt-Ah-8QM"/>
<constraint firstAttribute="centerY" secondItem="cZb-9N-gBv" secondAttribute="centerY" id="YLx-iu-oop"/>
<constraint firstAttribute="centerX" secondItem="cZb-9N-gBv" secondAttribute="centerX" id="aJ4-b5-5M8"/>
</constraints>
<connections>
<outlet property="outerImageView" destination="cZb-9N-gBv" id="K4s-1M-P8D"/>
</connections>
</customView>
</objects>
<resources>
<image name="Loading_View_Inner" width="121" height="121"/>
<image name="Loading_View_Outer" width="188" height="188"/>
</resources>
</document>
21 changes: 4 additions & 17 deletions OSX/Metabase/UI/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<outlet property="backButtonCell" destination="lEo-fP-VyB" id="Liq-b8-nP9"/>
<outlet property="forwardButtonCell" destination="uF3-qn-F0a" id="eR7-ml-w4X"/>
<outlet property="linkButtonCell" destination="D9P-hg-lf8" id="G2L-cA-69g"/>
<outlet property="loadingView" destination="rgN-Vh-1hF" id="NCM-3X-yhL"/>
<outlet property="refreshButtonCell" destination="SSf-hM-lhY" id="xJE-83-OZr"/>
<outlet property="titleBarView" destination="Pem-Bq-pDs" id="nGc-wz-YES"/>
<outlet property="view" destination="EiT-Mj-1SZ" id="hOv-v9-VQo"/>
Expand Down Expand Up @@ -163,18 +162,18 @@
</menuItem>
</items>
</menu>
<window title="Metabase" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="INAppStoreWindow">
<window title="Metabase" allowsToolTipsWhenApplicationIsInactive="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="INAppStoreWindow">
<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="335" y="390" width="1200" height="900"/>
<rect key="contentRect" x="335" y="390" width="1473" height="901"/>
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1418"/>
<value key="minSize" type="size" width="1000" height="800"/>
<view key="contentView" canDrawConcurrently="YES" id="EiT-Mj-1SZ">
<rect key="frame" x="0.0" y="0.0" width="1200" height="900"/>
<rect key="frame" x="0.0" y="0.0" width="1473" height="901"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<webView canDrawConcurrently="YES" translatesAutoresizingMaskIntoConstraints="NO" id="mhE-X5-FF6">
<rect key="frame" x="0.0" y="0.0" width="1200" height="900"/>
<rect key="frame" x="0.0" y="0.0" width="1473" height="901"/>
<autoresizingMask key="autoresizingMask"/>
<webPreferences key="preferences" defaultFontSize="12" defaultFixedFontSize="12" plugInsEnabled="NO" javaEnabled="NO">
<nil key="identifier"/>
Expand All @@ -184,22 +183,11 @@
<outlet property="resourceLoadDelegate" destination="8au-ff-PAw" id="Rnd-KA-IRb"/>
</connections>
</webView>
<imageView canDrawConcurrently="YES" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="rgN-Vh-1hF">
<rect key="frame" x="472" y="322" width="256" height="256"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<constraints>
<constraint firstAttribute="height" constant="256" id="Wi3-zz-jaD"/>
<constraint firstAttribute="width" constant="256" id="zOt-ub-YPO"/>
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" animates="YES" imageScaling="proportionallyDown" image="Logo_1024" id="wFY-0Y-m5p"/>
</imageView>
</subviews>
<constraints>
<constraint firstItem="mhE-X5-FF6" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" id="AbJ-I7-UJl"/>
<constraint firstItem="mhE-X5-FF6" firstAttribute="leading" secondItem="EiT-Mj-1SZ" secondAttribute="leading" id="JBU-I1-v0p"/>
<constraint firstAttribute="bottom" secondItem="mhE-X5-FF6" secondAttribute="bottom" id="OA1-e5-N7X"/>
<constraint firstAttribute="centerY" secondItem="rgN-Vh-1hF" secondAttribute="centerY" id="fMi-CB-Ih4"/>
<constraint firstAttribute="centerX" secondItem="rgN-Vh-1hF" secondAttribute="centerX" id="v6L-mJ-Sh5"/>
<constraint firstAttribute="trailing" secondItem="mhE-X5-FF6" secondAttribute="trailing" id="z4U-O6-LWv"/>
</constraints>
</view>
Expand Down Expand Up @@ -302,7 +290,6 @@
</customView>
</objects>
<resources>
<image name="Logo_1024" width="1024" height="1024"/>
<image name="back_icon" width="10" height="15"/>
<image name="forward_icon" width="10" height="15"/>
<image name="link_icon" width="16" height="15"/>
Expand Down
Loading

0 comments on commit e269997

Please sign in to comment.