Removed scroll from version checkbox
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
e07e182e95
commit
1961e2081f
@ -71,7 +71,7 @@ class CheckComboModel : public QIdentityProxyModel {
|
||||
CheckComboBox::CheckComboBox(QWidget* parent) : QComboBox(parent), m_separator(", ")
|
||||
{
|
||||
QLineEdit* lineEdit = new QLineEdit(this);
|
||||
lineEdit->setReadOnly(false);
|
||||
lineEdit->setReadOnly(true);
|
||||
setLineEdit(lineEdit);
|
||||
lineEdit->disconnect(this);
|
||||
setInsertPolicy(QComboBox::NoInsert);
|
||||
|
@ -89,6 +89,8 @@ ModFilterWidget::ModFilterWidget(MinecraftInstance* instance, bool extended, QWi
|
||||
|
||||
ui->versions->setStyleSheet("combobox-popup: 0;");
|
||||
ui->version->setStyleSheet("combobox-popup: 0;");
|
||||
ui->versions->installEventFilter(this);
|
||||
ui->version->installEventFilter(this);
|
||||
connect(ui->showAllVersions, &QCheckBox::stateChanged, this, &ModFilterWidget::onShowAllVersionsChanged);
|
||||
connect(ui->versions, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ModFilterWidget::onVersionFilterChanged);
|
||||
connect(ui->version, &QComboBox::currentTextChanged, this, &ModFilterWidget::onVersionFilterTextChanged);
|
||||
@ -115,6 +117,13 @@ ModFilterWidget::ModFilterWidget(MinecraftInstance* instance, bool extended, QWi
|
||||
prepareBasicFilter();
|
||||
}
|
||||
|
||||
bool ModFilterWidget::eventFilter(QObject* obj, QEvent* evt)
|
||||
{
|
||||
if ((obj != ui->versions && obj != ui->version) || evt->type() != QEvent::Wheel)
|
||||
return QTabWidget::eventFilter(obj, evt);
|
||||
return true;
|
||||
}
|
||||
|
||||
auto ModFilterWidget::getFilter() -> std::shared_ptr<Filter>
|
||||
{
|
||||
m_filter_changed = false;
|
||||
|
@ -85,6 +85,7 @@ class ModFilterWidget : public QTabWidget {
|
||||
|
||||
public slots:
|
||||
void setCategories(const QList<ModPlatform::Category>&);
|
||||
bool eventFilter(QObject* obj, QEvent* evt);
|
||||
|
||||
private:
|
||||
ModFilterWidget(MinecraftInstance* instance, bool extendedSupport, QWidget* parent = nullptr);
|
||||
|
Loading…
Reference in New Issue
Block a user