Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cosmetic improvements

  • Loading branch information...
commit e3629da726f8ebf777c271f24b601c8bf6da30c0 1 parent 27f0494
@machinecodex authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 XMGradientPanel/XMGradientPicker.m
View
18 XMGradientPanel/XMGradientPicker.m
@@ -15,8 +15,8 @@
#define kGradientRectHeight 15
#define kStopYOffset 4
-#define kTickMarkXOffsetBegin 20.0
-#define kTickMarkXOffsetEnd 5.0
+#define kTickMarkXOffsetBegin 19.0
+#define kTickMarkXOffsetEnd 7.0
#pragma mark -
@@ -583,18 +583,18 @@ - (NSRect) gradientRect {
NSRect aViewRect = [self bounds];
aViewRect.size.width -= 35;
- aViewRect.size.height -= 33;
- aViewRect.origin.x += 15.5;
+ aViewRect.size.height -= 23;
+ aViewRect.origin.x += 10.5;
aViewRect.origin.y += 15.5;
NSRect aGradientRect;
- CGFloat dimension = MAX(kGradientRectHeight, aViewRect.size.width - 20);
+ CGFloat dimension = MAX(kGradientRectHeight, aViewRect.size.width - 34);
- aGradientRect.origin.y = aViewRect.origin.x + kStopControlSize*.5;
- aGradientRect.origin.x = aViewRect.origin.y + aViewRect.size.width
+ aGradientRect.origin.y = aViewRect.origin.y + kStopControlSize*.5;
+ aGradientRect.origin.x = aViewRect.origin.x + aViewRect.size.width
- dimension - kStopYOffset;
- aGradientRect.size.height = aViewRect.size.height-kStopControlSize;
+ aGradientRect.size.height = aViewRect.size.height - kStopControlSize;
aGradientRect.size.width = dimension;
return aGradientRect;
@@ -636,7 +636,7 @@ - (void) drawCheckerboardInContext:(CGContextRef)theContext {
NSRectFill(rect);
// Draw the checkerboard
- NSInteger tx = 13; NSInteger ty = tx; CGFloat scale = 1.33;
+ NSInteger tx = 13; NSInteger ty = tx; CGFloat scale = 2.0;
NSInteger lx = rect.size.width / tx * scale; NSInteger ly = rect.size.height / ty * scale;
NSInteger xb, yb, i = 0, j = 0;
NSColor *oddColor, *evenColor;

0 comments on commit e3629da

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