curveview: set padding on top and bottom

This commit is contained in:
itsmattkc
2021-08-14 16:32:41 -07:00
parent 5cd6aaba66
commit c8c361e67d
2 changed files with 8 additions and 0 deletions
+6
View File
@@ -318,6 +318,12 @@ void CurveView::ContextMenuEvent(Menu &m)
connect(reset_zoom_action, &QAction::triggered, this, &CurveView::ResetZoom);
}
void CurveView::SceneRectUpdateEvent(QRectF &r)
{
r.setTop(r.top() - this->height());
r.setBottom(r.bottom() + this->height());
}
void CurveView::ZoomToFitInternal(const QList<NodeKeyframe *> &keys)
{
if (keys.isEmpty()) {
+2
View File
@@ -68,6 +68,8 @@ protected:
virtual void ContextMenuEvent(Menu &m) override;
virtual void SceneRectUpdateEvent(QRectF &r) override;
private:
void ZoomToFitInternal(const QList<NodeKeyframe *> &keys);