mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-05 12:56:58 +03:00
make the update column as a icon
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
abec40af7f
commit
18f04b1e29
6 changed files with 61 additions and 11 deletions
|
|
@ -596,8 +596,10 @@ QVariant ResourceFolderModel::data(const QModelIndex& index, int role) const
|
|||
case Qt::CheckStateRole:
|
||||
if (column == ActiveColumn) {
|
||||
return m_resources[row]->enabled() ? Qt::Checked : Qt::Unchecked;
|
||||
} else if (column == LockUpdateCoumn) {
|
||||
return !at(row).lockUpdate() ? Qt::Checked : Qt::Unchecked;
|
||||
}
|
||||
case Qt::UserRole:
|
||||
if (column == LockUpdateCoumn) {
|
||||
return at(row).lockUpdate();
|
||||
}
|
||||
return {};
|
||||
default:
|
||||
|
|
@ -612,10 +614,10 @@ bool ResourceFolderModel::setData(const QModelIndex& index, [[maybe_unused]] con
|
|||
return false;
|
||||
}
|
||||
|
||||
if (role == Qt::UserRole && columnNames(false).at(index.column()) == "Update") {
|
||||
return setModUpdate({ index }, EnableAction::TOGGLE);
|
||||
}
|
||||
if (role == Qt::CheckStateRole) {
|
||||
if (columnNames(false).at(index.column()) == "Update") {
|
||||
return setModUpdate({ index }, EnableAction::TOGGLE);
|
||||
}
|
||||
return setResourceEnabled({ index }, EnableAction::TOGGLE);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue