diff --git a/Slate/Constants.m b/Slate/Constants.m index 4c50e3e2..28a807c6 100644 --- a/Slate/Constants.m +++ b/Slate/Constants.m @@ -67,7 +67,7 @@ NSString *const WINDOW_HINTS_HEIGHT = @"windowHintsHeight"; NSString *const WINDOW_HINTS_HEIGHT_DEFAULT = @"100"; NSString *const WINDOW_HINTS_BACKGROUND_COLOR = @"windowHintsBackgroundColor"; -NSString *const WINDOW_HINTS_BACKGROUND_COLOR_DEFAULT = @"50;53;58;0.9"; +NSString *const WINDOW_HINTS_BACKGROUND_COLOR_DEFAULT = @"50;53;58;0.6"; NSString *const WINDOW_HINTS_DURATION = @"windowHintsDuration"; NSString *const WINDOW_HINTS_DURATION_DEFAULT = @"3"; NSString *const WINDOW_HINTS_ROUNDED_CORNER_SIZE = @"windowHintsRoundedCornerSize"; diff --git a/Slate/HintView.m b/Slate/HintView.m index 33a716de..8d5fbe43 100644 --- a/Slate/HintView.m +++ b/Slate/HintView.m @@ -83,17 +83,17 @@ - (void)drawRect:(NSRect)dirtyRect { [[NSGraphicsContext currentContext] saveGraphicsState]; [[NSGraphicsContext currentContext] setShouldAntialias:YES]; + // draw the icon behind the rounded rect, if specified + if (icon != nil) { + [icon drawInRect:[self bounds] fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:hintIconAlpha]; + } + // draw the rounded rect [hintBackgroundColor set]; float cornerSize = [[SlateConfig getInstance] getFloatConfig:WINDOW_HINTS_ROUNDED_CORNER_SIZE]; - NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:[self bounds] xRadius:cornerSize yRadius:cornerSize]; + NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:CGRectMake(self.bounds.origin.x + (self.bounds.size.width / 4), self.bounds.origin.y + (self.bounds.size.height / 4), self.bounds.size.width / 2, self.bounds.size.height / 2) xRadius:cornerSize yRadius:cornerSize]; [path fill]; - // draw the icon on top of the rounded rect, if specified - if (icon != nil) { - [icon drawInRect:[self bounds] fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:hintIconAlpha]; - } - // draw hint letter [self drawCenteredText:text bounds:self.bounds