mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
generate skin preview
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -239,8 +239,13 @@ QVariant SkinList::data(const QModelIndex& index, int role) const
|
||||
return QVariant();
|
||||
auto skin = m_skinList[row];
|
||||
switch (role) {
|
||||
case Qt::DecorationRole:
|
||||
return skin.getTexture();
|
||||
case Qt::DecorationRole: {
|
||||
auto preview = skin.getPreview();
|
||||
if (preview.isNull()) {
|
||||
preview = skin.getTexture();
|
||||
}
|
||||
return preview;
|
||||
}
|
||||
case Qt::DisplayRole:
|
||||
return skin.name();
|
||||
case Qt::UserRole:
|
||||
|
Reference in New Issue
Block a user