Sort VDE groups internally (#6102)

This commit is contained in:
BruebachL 2025-09-06 15:06:59 +02:00 committed by GitHub
parent bd65aae81e
commit 7f842bb1e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 181 additions and 111 deletions

View file

@ -142,6 +142,8 @@ QVariant DeckListModel::data(const QModelIndex &index, int role) const
return {};
}
}
case Qt::UserRole + 1:
return false;
case Qt::BackgroundRole: {
int color = 90 + 60 * node->depth();
return QBrush(QColor(color, 255, color));
@ -171,6 +173,8 @@ QVariant DeckListModel::data(const QModelIndex &index, int role) const
return {};
}
}
case Qt::UserRole + 1:
return true;
case Qt::BackgroundRole: {
int color = 255 - (index.row() % 2) * 30;
return QBrush(QColor(color, color, color));