mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
Fix QComboBox background and transparency workaround on macOS
This commit is contained in:
@ -30,17 +30,8 @@ QWidget* GetWrappedWidget(QWidget* wrapped_widget, QWidget* to_resize, int margi
|
|||||||
std::max(recommended_height, to_resize->height()));
|
std::max(recommended_height, to_resize->height()));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(__APPLE__)
|
scroll->viewport()->setAutoFillBackground(false);
|
||||||
// Transparency can cause unwanted side-effects on OSes other than Windows / macOS
|
wrapped_widget->setAutoFillBackground(false);
|
||||||
|
|
||||||
// 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;
|
return scroll;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user