revised UI color system when showing nodes

Olive now has a set of colors that categories can be "assigned" to. The timeline also shares the same colors as the NodeView. Colors can be configured per node (aka per clip).
This commit is contained in:
itsmattkc
2021-01-15 18:44:34 +11:00
parent 91740dd823
commit b4dd976e90
22 changed files with 443 additions and 72 deletions
@@ -700,6 +700,15 @@ void TimelineWidget::ToggleSelectedEnabled()
Core::instance()->undo_stack()->pushIfHasChildren(command);
}
void TimelineWidget::SetColorLabel(int index)
{
foreach (Block* b, selected_blocks_) {
b->SetOverrideColor(index);
}
UpdateViewports();
}
void TimelineWidget::InsertGapsAt(const rational &earliest_point, const rational &insert_length, QUndoCommand *command)
{
for (int i=0;i<Track::kCount;i++) {
@@ -926,6 +935,10 @@ void TimelineWidget::ShowContextMenu()
menu.addSeparator();
MenuShared::instance()->AddColorCodingMenu(&menu);
menu.addSeparator();
QAction* properties_action = menu.addAction(tr("Properties"));
connect(properties_action, &QAction::triggered, this, [this](){
QVector<Block*> block_items = GetSelectedBlocks();