Skip to content
Browse files

Support for @2x resources and retina Macs

  • Loading branch information...
1 parent 75d369d commit 7c5fc822f63212445479e195300bcc1a4aca5918 @gcamp committed Jun 13, 2012
View
4 GCJumpBar/GCJumpBarLabel.m
@@ -114,7 +114,7 @@ - (void)drawRect:(NSRect)dirtyRect {
CGFloat baseLeft = 0;
if (self.tag == GCJumpBarLabelAccessoryMenuLabelTag) {
- NSImage* separatorImage = [NSImage imageNamed:@"GCJumpBarAccessorySeparator.png"];
+ NSImage* separatorImage = [NSImage imageNamed:@"GCJumpBarAccessorySeparator"];
[separatorImage drawAtPoint:NSMakePoint(baseLeft + 1, self.frame.size.height / 2 - separatorImage.size.height / 2)
fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
baseLeft += separatorImage.size.width + GCJumpBarLabelMargin;
@@ -143,7 +143,7 @@ - (void)drawRect:(NSRect)dirtyRect {
}
if (!self.lastLabel && self.tag != GCJumpBarLabelAccessoryMenuLabelTag) {
- NSImage* separatorImage = [NSImage imageNamed:@"GCJumpBarSeparator.png"];
+ NSImage* separatorImage = [NSImage imageNamed:@"GCJumpBarSeparator"];
[separatorImage drawAtPoint:NSMakePoint(baseLeft, self.frame.size.height / 2 - separatorImage.size.height / 2)
fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
}
View
BIN GCJumpBar/Image/GCJumpBarAccessorySeparator@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN GCJumpBar/Image/GCJumpBarSeparator@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
8 GCJumpBarDemo.xcodeproj/project.pbxproj
@@ -18,6 +18,8 @@
B03A406F138D6F3A004677BE /* GCJumpBarLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = B03A4069138D6F3A004677BE /* GCJumpBarLabel.m */; };
B03A4070138D6F3A004677BE /* GCJumpBarSeparator.png in Resources */ = {isa = PBXBuildFile; fileRef = B03A406B138D6F3A004677BE /* GCJumpBarSeparator.png */; };
B04247D413A9A99C005FF30D /* GCJumpBarAccessorySeparator.png in Resources */ = {isa = PBXBuildFile; fileRef = B04247D313A9A99B005FF30D /* GCJumpBarAccessorySeparator.png */; };
+ B05396D815884DAF004B4EB3 /* GCJumpBarAccessorySeparator@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B05396D615884DAF004B4EB3 /* GCJumpBarAccessorySeparator@2x.png */; };
+ B05396D915884DAF004B4EB3 /* GCJumpBarSeparator@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B05396D715884DAF004B4EB3 /* GCJumpBarSeparator@2x.png */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -43,6 +45,8 @@
B03A4069138D6F3A004677BE /* GCJumpBarLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GCJumpBarLabel.m; sourceTree = "<group>"; };
B03A406B138D6F3A004677BE /* GCJumpBarSeparator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = GCJumpBarSeparator.png; sourceTree = "<group>"; };
B04247D313A9A99B005FF30D /* GCJumpBarAccessorySeparator.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = GCJumpBarAccessorySeparator.png; sourceTree = "<group>"; };
+ B05396D615884DAF004B4EB3 /* GCJumpBarAccessorySeparator@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "GCJumpBarAccessorySeparator@2x.png"; sourceTree = "<group>"; };
+ B05396D715884DAF004B4EB3 /* GCJumpBarSeparator@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "GCJumpBarSeparator@2x.png"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -144,7 +148,9 @@
isa = PBXGroup;
children = (
B04247D313A9A99B005FF30D /* GCJumpBarAccessorySeparator.png */,
+ B05396D615884DAF004B4EB3 /* GCJumpBarAccessorySeparator@2x.png */,
B03A406B138D6F3A004677BE /* GCJumpBarSeparator.png */,
+ B05396D715884DAF004B4EB3 /* GCJumpBarSeparator@2x.png */,
);
path = Image;
sourceTree = "<group>";
@@ -204,6 +210,8 @@
B03A4050138D5C34004677BE /* xcode.png in Resources */,
B03A4070138D6F3A004677BE /* GCJumpBarSeparator.png in Resources */,
B04247D413A9A99C005FF30D /* GCJumpBarAccessorySeparator.png in Resources */,
+ B05396D815884DAF004B4EB3 /* GCJumpBarAccessorySeparator@2x.png in Resources */,
+ B05396D915884DAF004B4EB3 /* GCJumpBarSeparator@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

0 comments on commit 7c5fc82

Please sign in to comment.
Something went wrong with that request. Please try again.