Redesign find in files UI

This commit is contained in:
Roy Qu 2023-07-05 19:34:17 +08:00
parent 595156e80f
commit 5240b1f01f
4 changed files with 25 additions and 7 deletions

View File

@ -9733,7 +9733,7 @@ void MainWindow::on_actionSubmit_Issues_triggered()
void MainWindow::on_actionDocument_triggered() void MainWindow::on_actionDocument_triggered()
{ {
QDesktopServices::openUrl(QUrl("https://royqh1979.gitee.io/redpandacpp/docsy/docs/")); QDesktopServices::openUrl(QUrl("https://royqh1979.gitee.io/redpandacpp/docsy/docs/usage"));
} }

View File

@ -99,6 +99,12 @@
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QComboBox" name="cbReplace"> <widget class="QComboBox" name="cbReplace">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editable"> <property name="editable">
<bool>true</bool> <bool>true</bool>
</property> </property>

View File

@ -428,12 +428,12 @@ void SearchInFileDialog::on_btnReplace_clicked()
void SearchInFileDialog::on_rbFolder_toggled(bool checked) void SearchInFileDialog::on_rbFolder_toggled(bool checked)
{ {
ui->lblFilters->setVisible(checked); // ui->lblFilters->setVisible(checked);
ui->txtFilters->setVisible(checked); ui->txtFilters->setEnabled(checked);
ui->lblFolder->setVisible(checked); // ui->lblFolder->setVisible(checked);
ui->txtFolder->setVisible(checked); ui->txtFolder->setEnabled(checked);
ui->btnChangeFolder->setVisible(checked); ui->btnChangeFolder->setEnabled(checked);
ui->cbSearchSubFolders->setVisible(checked); ui->cbSearchSubFolders->setEnabled(checked);
if (checked) { if (checked) {
if (!directoryExists(ui->txtFolder->text())) if (!directoryExists(ui->txtFolder->text()))
ui->txtFolder->setText(pSettings->environment().currentFolder()); ui->txtFolder->setText(pSettings->environment().currentFolder());

View File

@ -40,6 +40,12 @@
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
<widget class="QWidget" name="widget_2" native="true"> <widget class="QWidget" name="widget_2" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
@ -62,6 +68,12 @@
</item> </item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="lblFind"> <widget class="QLabel" name="lblFind">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text"> <property name="text">
<string>Text to Find:</string> <string>Text to Find:</string>
</property> </property>