implemented vertical "zooming" in the TimelineWidget and CurveView

This comes in the form of changing the vertical scale in the CurveView and
adjusting all track heights in the Timeline.
This commit is contained in:
itsmattkc
2019-12-31 00:23:28 +11:00
parent 441555e9f2
commit 2b24fae26f
22 changed files with 220 additions and 41 deletions
+10
View File
@@ -328,11 +328,21 @@ bool TrackOutput::IsTrack() const
return true;
}
int TrackOutput::GetTrackHeightIncrement()
{
return qApp->fontMetrics().height() / 2;
}
int TrackOutput::GetDefaultTrackHeight()
{
return qApp->fontMetrics().height() * 3;
}
int TrackOutput::GetTrackHeightMinimum()
{
return qApp->fontMetrics().height() * 3 / 2;
}
QString TrackOutput::GetDefaultTrackName(TrackType type, int index)
{
// Starts tracks at 1 rather than 0
+4
View File
@@ -120,8 +120,12 @@ public:
virtual bool IsTrack() const override;
static int GetTrackHeightIncrement();
static int GetDefaultTrackHeight();
static int GetTrackHeightMinimum();
static QString GetDefaultTrackName(TrackType type, int index);
bool IsMuted() const;