Skip to content

Commit

Permalink
Merge pull request #7775 from chargeflux/QComboBoxBGColorFix-macOS
Browse files Browse the repository at this point in the history
Fix QComboBox background and transparency workaround on macOS
  • Loading branch information
lioncash committed Mar 4, 2019
2 parents 13b2b93 + 77777cd commit 191ef76
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions Source/Core/DolphinQt/QtUtils/WrapInScrollArea.cpp
Expand Up @@ -30,17 +30,8 @@ QWidget* GetWrappedWidget(QWidget* wrapped_widget, QWidget* to_resize, int margi
std::max(recommended_height, to_resize->height()));
}

#if defined(_WIN32) || defined(__APPLE__)
// Transparency can cause unwanted side-effects on OSes other than Windows / macOS

// Make sure the background color stays consistent with the parent widget
QPalette p = wrapped_widget->palette();

p.setColor(QPalette::Window, QColor(0, 0, 0, 0));

wrapped_widget->setPalette(p);
scroll->setPalette(p);
#endif
scroll->viewport()->setAutoFillBackground(false);
wrapped_widget->setAutoFillBackground(false);

return scroll;
}
Expand Down

0 comments on commit 191ef76

Please sign in to comment.