Do quite a bit less work on resizing the timeline. Fix #175.

This commit is contained in:
Brent Simmons 2017-12-02 22:18:43 -08:00
parent 179c889d9b
commit c83e0ca68d
3 changed files with 6 additions and 3 deletions

View File

@ -62,7 +62,8 @@ private func rectForDate(_ cellData: TimelineCellData, _ width: CGFloat, _ appea
r.origin.y = NSMaxY(titleRect) + appearance.titleBottomMargin r.origin.y = NSMaxY(titleRect) + appearance.titleBottomMargin
r.origin.x = appearance.boxLeftMargin r.origin.x = appearance.boxLeftMargin
r.size.width = max(width - (r.origin.x + appearance.cellPadding.right), 0.0) r.size.width = min(width - (r.origin.x + appearance.cellPadding.right), r.size.width)
r.size.width = max(r.size.width, 0.0)
return r return r
} }

View File

@ -96,7 +96,6 @@ class TimelineTableCellView: NSTableCellView {
} }
super.setFrameSize(newSize) super.setFrameSize(newSize)
updateSubviews()
needsLayout = true needsLayout = true
} }

View File

@ -53,7 +53,10 @@ static NSAttributedString *emptyAttributedString = nil;
- (void)setRenderer:(RSSingleLineRenderer *)renderer { - (void)setRenderer:(RSSingleLineRenderer *)renderer {
if (_renderer == renderer) {
return;
}
_renderer = renderer; _renderer = renderer;
[self invalidateIntrinsicContentSize]; [self invalidateIntrinsicContentSize];
self.needsDisplay = YES; self.needsDisplay = YES;