Do quite a bit less work on resizing the timeline. Fix #175.
This commit is contained in:
parent
179c889d9b
commit
c83e0ca68d
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,7 +96,6 @@ class TimelineTableCellView: NSTableCellView {
|
||||||
}
|
}
|
||||||
|
|
||||||
super.setFrameSize(newSize)
|
super.setFrameSize(newSize)
|
||||||
updateSubviews()
|
|
||||||
needsLayout = true
|
needsLayout = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,9 @@ 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;
|
||||||
|
|
Loading…
Reference in New Issue