From c11575f5f5ca7d95853caf75b0021a70c5ede677 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Tue, 13 Dec 2022 08:31:52 +0100 Subject: [PATCH] Merge pull request #604 from flowln/fix_crash_with_gtk2 fix: crash with GTK2 theme due to QProxyStyle in ManagedPackPage --- 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 7a0d234cf..7a8230430 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){