QTfrontend/model/ThemeModel.cpp
changeset 8377 869f80966a77
parent 8049 133e22b5c410
child 8419 d99f46b676b5
equal deleted inserted replaced
8376:c11cc7246df7 8377:869f80966a77
    71         if (!QFile::exists(iconpath))
    71         if (!QFile::exists(iconpath))
    72             continue;
    72             continue;
    73 
    73 
    74         QMap<int, QVariant> dataset;
    74         QMap<int, QVariant> dataset;
    75 
    75 
       
    76         // set icon path
       
    77         dataset.insert(Qt::UserRole + 1, iconpath);
       
    78 
    76         // set name
    79         // set name
    77         dataset.insert(Qt::DisplayRole, theme);
    80         dataset.insert(Qt::DisplayRole, theme);
    78 
    81 
    79         // load and set icon
    82         // load and set icon
    80         QIcon icon(iconpath);
    83         QIcon icon;
       
    84         icon.addPixmap(QPixmap(iconpath), QIcon::Normal);
       
    85         icon.addPixmap(QPixmap(iconpath), QIcon::Disabled);
    81 
    86 
    82         dataset.insert(Qt::DecorationRole, icon);
    87         dataset.insert(Qt::DecorationRole, icon);
    83 
    88 
    84         // load and set preview icon
    89         // load and set preview icon
    85         QIcon preview(QString("physfs://Themes/%1/icon@2x.png").arg(theme));
    90         QIcon preview(QString("physfs://Themes/%1/icon@2x.png").arg(theme));