Skip to content

Commit

Permalink
remove the separator
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Aug 3, 2015
1 parent 1c5c3b1 commit 88c9bef
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 123 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,3 +3,4 @@ xcuserdata
*.xccheckout
*.xcuserstate
build/
Snapshots.xcodeproj/xcuserdata/
11 changes: 3 additions & 8 deletions SnapshotDiffs/ORSnapshotDiffs.m
Expand Up @@ -47,7 +47,7 @@ + (void)pluginDidLoad:(NSBundle *)plugin

// Get the original switch view
NSView *switchView = orig.view;
CGSize viewSize = (CGSize){ 160, 25 };
CGSize viewSize = (CGSize){ 137, 25 };

// Make a new container that's wider
NSView *holder = [[NSView alloc] initWithFrame:(CGRect){0, 0, viewSize}];
Expand All @@ -61,14 +61,9 @@ + (void)pluginDidLoad:(NSBundle *)plugin

NSBundle *bundle = [NSBundle bundleForClass:ORSnapshotDiffs.class];
NSImage *image = [bundle imageForResource:@"SnapshotToolbarIcon"];
NSImage *separatorImage = [bundle imageForResource:@"SeparatorImage"];

NSImageView *imageView = [[NSImageView alloc] initWithFrame:CGRectMake(newSwitchFrame.origin.x - 10, 3, 2, 18)];
imageView.image = separatorImage;
[holder addSubview:imageView];


// Make the damn button
CGRect snapshotFrame = CGRectMake(imageView.frame.origin.x - 8 - image.size.width, 0, image.size.width, image.size.height);
CGRect snapshotFrame = CGRectMake(0, 0, image.size.width, image.size.height);
NSButton *snapshotButton = [[NSButton alloc] initWithFrame:snapshotFrame];
snapshotButton.image = image;
snapshotButton.alternateImage = image;
Expand Down
Binary file removed SnapshotDiffs/SeparatorImage.png
Binary file not shown.
4 changes: 0 additions & 4 deletions Snapshots.xcodeproj/project.pbxproj
Expand Up @@ -26,7 +26,6 @@
6020BD7A194E14E10027B265 /* BackArrowActive.png in Resources */ = {isa = PBXBuildFile; fileRef = 6020BD78194E14E10027B265 /* BackArrowActive.png */; };
6020BD7B194E14E10027B265 /* BackArrow.png in Resources */ = {isa = PBXBuildFile; fileRef = 6020BD79194E14E10027B265 /* BackArrow.png */; };
6020BD88194E3F7B0027B265 /* ORSlidingImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6020BD87194E3F7B0027B265 /* ORSlidingImageView.m */; };
6020BD8A194E50DE0027B265 /* SeparatorImage.png in Resources */ = {isa = PBXBuildFile; fileRef = 6020BD89194E50DE0027B265 /* SeparatorImage.png */; };
605A0232194A34A500920397 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 605A0231194A34A500920397 /* AppKit.framework */; };
605A0234194A34A500920397 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 605A0233194A34A500920397 /* Foundation.framework */; };
605A023A194A34A500920397 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 605A0238194A34A500920397 /* InfoPlist.strings */; };
Expand Down Expand Up @@ -69,7 +68,6 @@
6020BD79194E14E10027B265 /* BackArrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = BackArrow.png; sourceTree = "<group>"; };
6020BD86194E3F7B0027B265 /* ORSlidingImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORSlidingImageView.h; sourceTree = "<group>"; };
6020BD87194E3F7B0027B265 /* ORSlidingImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORSlidingImageView.m; sourceTree = "<group>"; };
6020BD89194E50DE0027B265 /* SeparatorImage.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = SeparatorImage.png; sourceTree = "<group>"; };
605A022E194A34A500920397 /* Snapshots.xcplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Snapshots.xcplugin; sourceTree = BUILT_PRODUCTS_DIR; };
605A0231194A34A500920397 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
605A0233194A34A500920397 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -208,7 +206,6 @@
605A0236194A34A500920397 /* Supporting Files */ = {
isa = PBXGroup;
children = (
6020BD89194E50DE0027B265 /* SeparatorImage.png */,
6020BD78194E14E10027B265 /* BackArrowActive.png */,
6020BD79194E14E10027B265 /* BackArrow.png */,
6020BD74194E09470027B265 /* ViewDiffImageActive.png */,
Expand Down Expand Up @@ -316,7 +313,6 @@
6018B70F194DEFB4001981D7 /* OutputExamples in Resources */,
60D4D718198F1B6C001AB8AF /* SnapshotToolbarIconError.png in Resources */,
6020BD76194E09470027B265 /* ViewDiffImageActive.png in Resources */,
6020BD8A194E50DE0027B265 /* SeparatorImage.png in Resources */,
605A023A194A34A500920397 /* InfoPlist.strings in Resources */,
6020BD73194E08210027B265 /* KaleidoscopeAllButtonActive.png in Resources */,
);
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 88c9bef

Please sign in to comment.