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