Skip to content

Commit

Permalink
Minor changes to fix some issues
Browse files Browse the repository at this point in the history
  • Loading branch information
stevestreza committed Jan 24, 2010
1 parent f502bef commit 37b63f0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Source/NSColor+CGColor.h
Expand Up @@ -17,7 +17,7 @@

#import "VSGlobal.h"

#ifdef TARGET_OS_IPHONE
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
@interface UIColor (CGColorRef)
#elif TARGET_OS_MAC
Expand Down
2 changes: 1 addition & 1 deletion Source/NSColorAdditions.m
Expand Up @@ -133,7 +133,7 @@ - (VSColor*)copyWithAlpha:(CGFloat)newAlpha {
CGFloat g = rgba[1];
CGFloat b = rgba[2];

return VSColorRGBA(r,g,b,newAlpha);
return [VSColorRGBA(r,g,b,newAlpha) copy];
}

- (VSColor*)addHue:(CGFloat)hd saturation:(CGFloat)sd value:(CGFloat)vd {
Expand Down
6 changes: 3 additions & 3 deletions Source/NSView+VSStyle.m
Expand Up @@ -33,9 +33,9 @@ -(void)drawStyle:(VSStyle *)style inRect:(CGRect)rect{
context.contentFrame = context.frame;

[style draw:context];
if (!context.didDrawContent) {
// [self drawContent:[context contentFrame]];
}
// if (!context.didDrawContent && [self respondsToSelector:@selector(drawLayer:withStyle:)]) {
// [self drawLayer:context withStyle:style];
// }
}
}

Expand Down
5 changes: 4 additions & 1 deletion Source/VSImageStyle.m
Expand Up @@ -101,7 +101,10 @@ - (void)dealloc {
// VSStyle

- (void)draw:(VSStyleContext*)context {
VSImage* image = [self imageForContext:context];
VSImage* image = _image;
if(!image){
image = [self imageForContext:context];
}
if (image) {
[image drawInRect:context.contentFrame contentMode:_contentMode];
}
Expand Down
2 changes: 1 addition & 1 deletion Source/VSInnerShadowStyle.m
Expand Up @@ -31,7 +31,7 @@ - (void)draw:(VSStyleContext*)context {
CGContextClip(ctx);

[context.shape addInverseToPath:context.frame];
[[VSColor whiteColor] setFill];
// [[VSColor whiteColor] setFill];
CGContextSetShadowWithColor(ctx, CGSizeMake(_offset.width, -_offset.height), _blur,
_color.CGColor);
CGContextEOFillPath(ctx);
Expand Down

0 comments on commit 37b63f0

Please sign in to comment.