From 83deccf26651ed7874d2fd8693fb1da661a1d62f Mon Sep 17 00:00:00 2001 From: flow Date: Mon, 12 Dec 2022 23:31:10 -0300 Subject: [PATCH] fix(ManagedPackPage): crash with GTK2 theme due to QProxyStyle Seemingly related issue: https://bugreports.qt.io/browse/QTBUG-49940 Signed-off-by: flow --- launcher/ui/pages/instance/ManagedPackPage.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/launcher/ui/pages/instance/ManagedPackPage.cpp b/launcher/ui/pages/instance/ManagedPackPage.cpp index 7a0d234c..7a823043 100644 --- a/launcher/ui/pages/instance/ManagedPackPage.cpp +++ b/launcher/ui/pages/instance/ManagedPackPage.cpp @@ -7,6 +7,7 @@ #include #include +#include #include @@ -60,7 +61,10 @@ ManagedPackPage::ManagedPackPage(BaseInstance* inst, InstanceWindow* instance_wi ui->setupUi(this); - ui->versionsComboBox->setStyle(new NoBigComboBoxStyle(ui->versionsComboBox->style())); + // NOTE: GTK2 themes crash with the proxy style. + // This seems like an upstream bug, so there's not much else that can be done. + if (!QStyleFactory::keys().contains("gtk2")) + ui->versionsComboBox->setStyle(new NoBigComboBoxStyle(ui->versionsComboBox->style())); ui->reloadButton->setVisible(false); connect(ui->reloadButton, &QPushButton::clicked, this, [this](bool){