more refactoring and timeline rewriting

This commit is contained in:
itsmattkc
2019-03-31 14:14:37 +11:00
parent f40b744dd4
commit 8989333e99
17 changed files with 621 additions and 498 deletions
+6
View File
@@ -99,3 +99,9 @@ QRect fit_size_into_rect(const QRect &r, int width, int height)
return QRect(r.x(), r.y() + (r.height() / 2 - new_height / 2), r.width(), new_height);
}
}
template<typename T>
const T &clamp(const T &val, T &min, T &max)
{
return qMax(qMin(max, val), min);
}