From ef0b5e2cf3e4aee9c36a17676b7313ed7ceac1b7 Mon Sep 17 00:00:00 2001 From: chargeflux <20979457+chargeflux@users.noreply.github.com> Date: Sat, 2 Feb 2019 10:28:46 -0500 Subject: [PATCH] Fix QComboBox background and transparency workaround on macOS --- Source/Core/DolphinQt/QtUtils/WrapInScrollArea.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/Source/Core/DolphinQt/QtUtils/WrapInScrollArea.cpp b/Source/Core/DolphinQt/QtUtils/WrapInScrollArea.cpp index d06f7b957f24..25975aad8271 100644 --- a/Source/Core/DolphinQt/QtUtils/WrapInScrollArea.cpp +++ b/Source/Core/DolphinQt/QtUtils/WrapInScrollArea.cpp @@ -15,6 +15,7 @@ QWidget* GetWrappedWidget(QWidget* wrapped_widget, QWidget* to_resize, int margi int margin_height) { auto* scroll = new QScrollArea; + scroll->setBackgroundRole(QPalette::PlaceholderText); scroll->setWidget(wrapped_widget); scroll->setWidgetResizable(true); scroll->setFrameStyle(QFrame::NoFrame); @@ -30,18 +31,6 @@ 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 - return scroll; }