diff options
author | Petr Mrázek <peterix@users.noreply.github.com> | 2021-10-24 01:01:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-24 01:01:58 +0200 |
commit | 110c73edf21f5421bf4aa8e091044c77e4789cf5 (patch) | |
tree | 2e8ed4ae156e01e800d126fcbfe3bdf1a4989075 | |
parent | e6cb7b7710198f5bab8a07723448a78d769f8de3 (diff) | |
parent | 3f0e729815b420e852a0d05f55426b42320055ef (diff) | |
download | PrismLauncher-110c73edf21f5421bf4aa8e091044c77e4789cf5.tar.gz PrismLauncher-110c73edf21f5421bf4aa8e091044c77e4789cf5.tar.bz2 PrismLauncher-110c73edf21f5421bf4aa8e091044c77e4789cf5.zip |
Merge pull request #4178 from jamierocks/qt-clear-button
NOISSUE Use Qt's clear button for ATLauncher page
-rw-r--r-- | launcher/pages/modplatform/atlauncher/AtlPage.cpp | 6 | ||||
-rw-r--r-- | launcher/pages/modplatform/atlauncher/AtlPage.h | 1 | ||||
-rw-r--r-- | launcher/pages/modplatform/atlauncher/AtlPage.ui | 17 |
3 files changed, 6 insertions, 18 deletions
diff --git a/launcher/pages/modplatform/atlauncher/AtlPage.cpp b/launcher/pages/modplatform/atlauncher/AtlPage.cpp index e59e5fe1..0367bc48 100644 --- a/launcher/pages/modplatform/atlauncher/AtlPage.cpp +++ b/launcher/pages/modplatform/atlauncher/AtlPage.cpp @@ -31,7 +31,6 @@ AtlPage::AtlPage(NewInstanceDialog* dialog, QWidget *parent) ui->sortByBox->setCurrentText(filterModel->translateCurrentSorting()); connect(ui->searchEdit, &QLineEdit::textChanged, this, &AtlPage::triggerSearch); - connect(ui->resetButton, &QPushButton::clicked, this, &AtlPage::resetSearch); connect(ui->sortByBox, &QComboBox::currentTextChanged, this, &AtlPage::onSortingSelectionChanged); connect(ui->packView->selectionModel(), &QItemSelectionModel::currentChanged, this, &AtlPage::onSelectionChanged); connect(ui->versionSelectionBox, &QComboBox::currentTextChanged, this, &AtlPage::onVersionSelectionChanged); @@ -85,11 +84,6 @@ void AtlPage::triggerSearch() filterModel->setSearchTerm(ui->searchEdit->text()); } -void AtlPage::resetSearch() -{ - ui->searchEdit->setText(""); -} - void AtlPage::onSortingSelectionChanged(QString data) { auto toSet = filterModel->getAvailableSortings().value(data); diff --git a/launcher/pages/modplatform/atlauncher/AtlPage.h b/launcher/pages/modplatform/atlauncher/AtlPage.h index ed872053..84c40656 100644 --- a/launcher/pages/modplatform/atlauncher/AtlPage.h +++ b/launcher/pages/modplatform/atlauncher/AtlPage.h @@ -67,7 +67,6 @@ private: private slots: void triggerSearch(); - void resetSearch(); void onSortingSelectionChanged(QString data); diff --git a/launcher/pages/modplatform/atlauncher/AtlPage.ui b/launcher/pages/modplatform/atlauncher/AtlPage.ui index f16c24b8..9085766a 100644 --- a/launcher/pages/modplatform/atlauncher/AtlPage.ui +++ b/launcher/pages/modplatform/atlauncher/AtlPage.ui @@ -15,15 +15,15 @@ <layout class="QGridLayout" name="gridLayout_3"> <item row="1" column="0"> <widget class="QTreeView" name="packView"> + <property name="alternatingRowColors"> + <bool>true</bool> + </property> <property name="iconSize"> <size> <width>96</width> <height>48</height> </size> </property> - <property name="alternatingRowColors"> - <bool>true</bool> - </property> </widget> </item> <item row="1" column="1"> @@ -68,25 +68,20 @@ </item> </layout> </item> - <item row="0" column="1"> - <widget class="QPushButton" name="resetButton"> - <property name="text"> - <string>Reset</string> - </property> - </widget> - </item> <item row="0" column="0"> <widget class="QLineEdit" name="searchEdit"> <property name="placeholderText"> <string>Search and filter ...</string> </property> + <property name="clearButtonEnabled"> + <bool>true</bool> + </property> </widget> </item> </layout> </widget> <tabstops> <tabstop>searchEdit</tabstop> - <tabstop>resetButton</tabstop> <tabstop>packView</tabstop> <tabstop>packDescription</tabstop> <tabstop>sortByBox</tabstop> |