Skip to content

Commit

Permalink
Fixes for stylesheets that use transparent backgrounds (#2029)
Browse files Browse the repository at this point in the history
* Remove uneeded "Fix" text

* Don't set Qt::WA_OpaquePaintEvent when imagesThumbnails has transparent base

---------

Co-authored-by: Liderate <[email protected]>
  • Loading branch information
Liderate and Liderate authored May 19, 2024
1 parent 16423b2 commit a1d1991
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/modinfodialogimages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ ImagesTab::ImagesTab(ModInfoDialogTabContext cx)
ui->imagesShowDDS->setEnabled(m_ddsAvailable);

ui->imagesThumbnails->setAutoFillBackground(false);
ui->imagesThumbnails->setAttribute(Qt::WA_OpaquePaintEvent, true);

if (ui->imagesThumbnails->palette().color(QPalette::Base) != Qt::transparent) {
ui->imagesThumbnails->setAttribute(Qt::WA_OpaquePaintEvent, true);
}

{
auto list = std::make_unique<QListWidget>();
Expand Down
1 change: 0 additions & 1 deletion src/problemsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ void ProblemsDialog::runDiagnosis()
m_hasProblems = true;

if (diagnose->hasGuidedFix(key)) {
newItem->setText(1, tr("Fix"));
QPushButton* fixButton = new QPushButton(tr("Fix"));
fixButton->setProperty("fix",
QVariant::fromValue(reinterpret_cast<void*>(diagnose)));
Expand Down

0 comments on commit a1d1991

Please sign in to comment.