mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
Add opt-in for showing mod incompatibilities
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
b664846030
commit
71278ff7ea
4 changed files with 22 additions and 7 deletions
|
|
@ -503,7 +503,7 @@ bool ResourceFolderModel::validateIndex(const QModelIndex& index) const
|
|||
// and they only delegate to the superclass for compatible columns
|
||||
QBrush ResourceFolderModel::rowBackground(int row) const
|
||||
{
|
||||
if (m_resources[row]->hasIssues()) {
|
||||
if (APPLICATION->settings()->get("ShowModIncompat").toBool() && m_resources[row]->hasIssues()) {
|
||||
return { QColor(255, 0, 0, 40) };
|
||||
} else {
|
||||
return {};
|
||||
|
|
@ -538,8 +538,10 @@ QVariant ResourceFolderModel::data(const QModelIndex& index, int role) const
|
|||
QString tooltip = m_resources[row]->internal_id();
|
||||
|
||||
if (column == NameColumn) {
|
||||
for (const QString& issue : at(row).issues()) {
|
||||
tooltip += "\n" + issue;
|
||||
if (APPLICATION->settings()->get("ShowModIncompat").toBool()) {
|
||||
for (const QString& issue : at(row).issues()) {
|
||||
tooltip += "\n" + issue;
|
||||
}
|
||||
}
|
||||
|
||||
if (at(row).isSymLinkUnder(instDirPath())) {
|
||||
|
|
@ -559,7 +561,7 @@ QVariant ResourceFolderModel::data(const QModelIndex& index, int role) const
|
|||
}
|
||||
case Qt::DecorationRole: {
|
||||
if (column == NameColumn) {
|
||||
if (at(row).hasIssues()) {
|
||||
if (APPLICATION->settings()->get("ShowModIncompat").toBool() && at(row).hasIssues()) {
|
||||
return QIcon::fromTheme("status-bad");
|
||||
} else if (at(row).isSymLinkUnder(instDirPath()) || at(row).isMoreThanOneHardLink()) {
|
||||
return QIcon::fromTheme("status-yellow");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue