better attachment between labels and tracks

This commit is contained in:
itsmattkc
2019-04-04 19:35:52 +11:00
parent e708791e90
commit d7091c2b10
9 changed files with 53 additions and 27 deletions
+9
View File
@@ -52,6 +52,8 @@ void TimelineLabel::SetTrack(Track *track)
connect(mute_button_, SIGNAL(toggled(bool)), track_, SLOT(SetMuted(bool)));
connect(solo_button_, SIGNAL(toggled(bool)), track_, SLOT(SetSoloed(bool)));
connect(lock_button_, SIGNAL(toggled(bool)), track_, SLOT(SetLocked(bool)));
connect(track_, SIGNAL(HeightChanged(int)), this, SLOT(UpdateHeight(int)));
}
}
@@ -59,6 +61,8 @@ void TimelineLabel::UpdateState()
{
label_->setText(track_->name());
UpdateHeight(track_->height());
mute_button_->setChecked(track_->IsMuted());
solo_button_->setChecked(track_->IsSoloed());
lock_button_->setChecked(track_->IsLocked());
@@ -79,3 +83,8 @@ void TimelineLabel::RenameTrack()
UpdateState();
}
}
void TimelineLabel::UpdateHeight(int h)
{
setFixedHeight(h);
}