This commit is contained in:
Josh Vera 2014-06-17 06:31:23 -04:00
Родитель 72c50a4002
Коммит 9687f30d6b
1 изменённых файлов: 10 добавлений и 15 удалений

Просмотреть файл

@ -108,7 +108,7 @@ static CGFloat RBLRectsGetMedianY(CGRect r1, CGRect r2) {
_clippingPath = clippingPath;
CGPathRetain(_clippingPath);
self.needsDisplay = YES;
self.needsLayout = YES;
}
- (void)drawRect:(NSRect)dirtyRect {
@ -618,41 +618,36 @@ static CGFloat const RBLPopoverBackgroundViewArrowWidth = 35.0;
return self;
}
- (void)setFrame:(NSRect)frameRect {
[super setFrame:frameRect];
[self rbl_updateClippingView];
- (void)drawRect:(NSRect)rect {
[super drawRect:rect];
[self.fillColor set];
NSRectFill(rect);
}
- (void)setArrowSize:(CGSize)arrowSize {
if (CGSizeEqualToSize(arrowSize, self.arrowSize)) return;
_arrowSize = arrowSize;
[self rbl_updateClippingView];
self.needsLayout = YES;
}
- (void)setPopoverEdge:(CGRectEdge)popoverEdge {
if (popoverEdge == self.popoverEdge) return;
_popoverEdge = popoverEdge;
[self rbl_updateClippingView];
self.needsLayout = YES;
}
- (void)setPopoverOrigin:(NSRect)popoverOrigin {
if (NSEqualRects(popoverOrigin, self.popoverOrigin)) return;
_popoverOrigin = popoverOrigin;
[self rbl_updateClippingView];
}
- (void)drawRect:(NSRect)rect {
[super drawRect:rect];
[self.fillColor set];
NSRectFill(rect);
self.needsLayout = YES;
}
- (BOOL)isOpaque {
return NO;
}
- (void)viewDidMoveToWindow {
[super viewDidMoveToWindow];
- (void)layout {
[super layout];
[self rbl_updateClippingView];
}