From b741ef81bd06a0f70695abe3a0238380b4348405 Mon Sep 17 00:00:00 2001 From: spycrab Date: Wed, 2 May 2018 20:08:46 +0200 Subject: [PATCH] Qt/WrapInScrollArea: Make background color more consistent --- Source/Core/DolphinQt2/QtUtils/WrapInScrollArea.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Core/DolphinQt2/QtUtils/WrapInScrollArea.cpp b/Source/Core/DolphinQt2/QtUtils/WrapInScrollArea.cpp index 1327092bb3..32ffb0c652 100644 --- a/Source/Core/DolphinQt2/QtUtils/WrapInScrollArea.cpp +++ b/Source/Core/DolphinQt2/QtUtils/WrapInScrollArea.cpp @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -29,6 +30,12 @@ QWidget* GetWrappedWidget(QWidget* wrapped_widget, QWidget* to_resize, int margi std::max(recommended_height, to_resize->height())); } + // 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); + return scroll; }