diff --git a/AppKit/CPRuleEditor/_CPRuleEditorViewSlice.j b/AppKit/CPRuleEditor/_CPRuleEditorViewSlice.j index f0128dbcdc..61f22edcdf 100644 --- a/AppKit/CPRuleEditor/_CPRuleEditorViewSlice.j +++ b/AppKit/CPRuleEditor/_CPRuleEditorViewSlice.j @@ -45,7 +45,7 @@ { var context = [[CPGraphicsContext currentContext] graphicsPort], bounds = [self bounds], - maxX = CGRectGetWidth(bounds) - 2, + maxX = CGRectGetWidth(bounds), maxY = CGRectGetHeight(bounds); // Draw background @@ -63,7 +63,7 @@ // Draw Top Border CGContextBeginPath(context); - CGContextMoveToPoint(context, 1, 0); + CGContextMoveToPoint(context, 0, 0); CGContextAddLineToPoint(context, maxX, 0); CGContextClosePath(context); CGContextSetStrokeColor(context, [_ruleEditor _sliceTopBorderColor]); @@ -71,8 +71,8 @@ // Draw Bottom Border CGContextBeginPath(context); - CGContextMoveToPoint(context, 1, maxY - 0.5); - CGContextAddLineToPoint(context, maxX, maxY - 0.5); + CGContextMoveToPoint(context, 0, maxY); + CGContextAddLineToPoint(context, maxX, maxY); CGContextClosePath(context); var bottomColor = (_rowIndex == [_ruleEditor _lastRow]) ? [_ruleEditor _sliceLastBottomBorderColor] : [_ruleEditor _sliceBottomBorderColor]; CGContextSetStrokeColor(context, bottomColor); @@ -106,4 +106,4 @@ return [CPString stringWithFormat:@"<%@ %p index:%d indentation:%d>",[self className],self,[self rowIndex],[self indentation]]; } -@end \ No newline at end of file +@end diff --git a/AppKit/CPRuleEditor/_CPRuleEditorViewSliceRow.j b/AppKit/CPRuleEditor/_CPRuleEditorViewSliceRow.j index 58f0fe5ce7..127785b679 100644 --- a/AppKit/CPRuleEditor/_CPRuleEditorViewSliceRow.j +++ b/AppKit/CPRuleEditor/_CPRuleEditorViewSliceRow.j @@ -121,7 +121,7 @@ var CONTROL_HEIGHT = 16., return [CPMenuItem separatorItem]; } -- (_CPRuleEditorTextField)_createStaticTextFieldWithStringValue:(CPString )text +- (_CPRuleEditorTextField)_createStaticTextFieldWithStringValue:(CPString)text { var textField = [[_CPRuleEditorTextField alloc] initWithFrame:CPMakeRect(0, 0, 200, CONTROL_HEIGHT)], refont = [_ruleEditor font], @@ -352,6 +352,15 @@ var CONTROL_HEIGHT = 16., optionFrame = _ruleOptionFrames[i]; optionFrame.origin.y = (rowHeight - CGRectGetHeight(optionFrame)) / 2 - 2; + + // small positioning fix + if ([ruleOptionView isKindOfClass:CPTextField]) + { + optionFrame.origin.y += 2; + [_ruleOptionViews[i] setValue:CGInsetMake(7, 7, 7, 8) forThemeAttribute:@"content-inset"]; + } + + if (widthChanged) { optionFrame.origin.x = optionViewOriginX;