fix(ManagedPackPage): crash with GTK2 theme due to QProxyStyle
Seemingly related issue: https://bugreports.qt.io/browse/QTBUG-49940 Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
aaef448959
commit
83deccf266
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include <QListView>
|
#include <QListView>
|
||||||
#include <QProxyStyle>
|
#include <QProxyStyle>
|
||||||
|
#include <QStyleFactory>
|
||||||
|
|
||||||
#include <HoeDown.h>
|
#include <HoeDown.h>
|
||||||
|
|
||||||
@ -60,7 +61,10 @@ ManagedPackPage::ManagedPackPage(BaseInstance* inst, InstanceWindow* instance_wi
|
|||||||
|
|
||||||
ui->setupUi(this);
|
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);
|
ui->reloadButton->setVisible(false);
|
||||||
connect(ui->reloadButton, &QPushButton::clicked, this, [this](bool){
|
connect(ui->reloadButton, &QPushButton::clicked, this, [this](bool){
|
||||||
|
Loading…
Reference in New Issue
Block a user