fix: draw separator in bounds
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
- (void)drawRect:(NSRect)r {
|
- (void)drawRect:(NSRect)r {
|
||||||
NSColor *color = [NSColor darkGrayColor];
|
NSColor *color = [NSColor darkGrayColor];
|
||||||
NSGradient *grdnt = [[NSGradient alloc] initWithStartingColor:color endingColor:[color colorWithAlphaComponent:0.0]];
|
NSGradient *grdnt = [[NSGradient alloc] initWithStartingColor:color endingColor:[color colorWithAlphaComponent:0.0]];
|
||||||
NSRect separatorRect = NSMakeRect(1, NSMidY(self.frame) - 1, NSWidth(self.frame) - 2, 2);
|
NSRect separatorRect = NSMakeRect(1, NSMidY(self.bounds) - 1, NSWidth(self.bounds) - 2, 2);
|
||||||
NSBezierPath *rounded = [NSBezierPath bezierPathWithRoundedRect:separatorRect xRadius:1 yRadius:1];
|
NSBezierPath *rounded = [NSBezierPath bezierPathWithRoundedRect:separatorRect xRadius:1 yRadius:1];
|
||||||
[grdnt drawInBezierPath:rounded angle:0];
|
[grdnt drawInBezierPath:rounded angle:0];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user