diff --git a/doc/index.docbook b/doc/index.docbook --- a/doc/index.docbook +++ b/doc/index.docbook @@ -782,7 +782,7 @@ &dolphin; is capable of searching for files and for content in files. If &Ctrl;F is pressed or Edit -Find... is used, the Find +Search... is used, the Search bar will open already set up to search for files within the current folder and any sub-folders. Start to type into the find input box and the search starts immediately. @@ -821,7 +821,7 @@ -Use the More Options button to extend the Find +Use the More Options button to extend the Search bar. This provides a very comfortable way for the user to shrink the number of search results. To start a search select one or more file types (Documents, @@ -1693,7 +1693,7 @@ &Ctrl;F Edit -Find... +Search... Opens the find bar. Enter a search term into the edit box and select to search for filename or in contents of files starting from the current folder or everywhere. diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -928,9 +928,13 @@ menu->addSeparator(); + // Overwrite Find action to Search action + QAction *searchAction = ac->action(KStandardAction::name(KStandardAction::Find)); + searchAction->setText(i18n("Search...")); + // Add "Edit" actions bool added = addActionToMenu(ac->action(KStandardAction::name(KStandardAction::Undo)), menu) | - addActionToMenu(ac->action(KStandardAction::name(KStandardAction::Find)), menu) | + addActionToMenu(searchAction, menu) | addActionToMenu(ac->action(KStandardAction::name(KStandardAction::SelectAll)), menu) | addActionToMenu(ac->action(QStringLiteral("invert_selection")), menu); @@ -1140,7 +1144,8 @@ // due to the long text, the text "Paste" is used: paste->setIconText(i18nc("@action:inmenu Edit", "Paste")); - KStandardAction::find(this, &DolphinMainWindow::find, actionCollection()); + QAction *searchAction = KStandardAction::find(this, &DolphinMainWindow::find, actionCollection()); + searchAction->setText(i18n("Search...")); KStandardAction::selectAll(this, &DolphinMainWindow::selectAll, actionCollection()); diff --git a/src/filterbar/filterbar.cpp b/src/filterbar/filterbar.cpp --- a/src/filterbar/filterbar.cpp +++ b/src/filterbar/filterbar.cpp @@ -47,26 +47,22 @@ m_lockButton->setToolTip(i18nc("@info:tooltip", "Keep Filter When Changing Folders")); connect(m_lockButton, &QToolButton::toggled, this, &FilterBar::slotToggleLockButton); - // Create label - QLabel* filterLabel = new QLabel(i18nc("@label:textbox", "Filter:"), this); // Create filter editor m_filterInput = new QLineEdit(this); m_filterInput->setLayoutDirection(Qt::LeftToRight); m_filterInput->setClearButtonEnabled(true); + m_filterInput->setPlaceholderText(i18n("Filter...")); connect(m_filterInput, &QLineEdit::textChanged, this, &FilterBar::filterChanged); setFocusProxy(m_filterInput); // Apply layout QHBoxLayout* hLayout = new QHBoxLayout(this); hLayout->setContentsMargins(0, 0, 0, 0); hLayout->addWidget(closeButton); - hLayout->addWidget(filterLabel); hLayout->addWidget(m_filterInput); hLayout->addWidget(m_lockButton); - - filterLabel->setBuddy(m_filterInput); } FilterBar::~FilterBar() diff --git a/src/search/dolphinsearchbox.h b/src/search/dolphinsearchbox.h --- a/src/search/dolphinsearchbox.h +++ b/src/search/dolphinsearchbox.h @@ -166,7 +166,6 @@ QVBoxLayout* m_topLayout; - QLabel* m_searchLabel; QLineEdit* m_searchInput; QAction* m_saveSearchAction; QScrollArea* m_optionsScrollArea; diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp --- a/src/search/dolphinsearchbox.cpp +++ b/src/search/dolphinsearchbox.cpp @@ -49,7 +49,6 @@ m_startedSearching(false), m_active(true), m_topLayout(nullptr), - m_searchLabel(nullptr), m_searchInput(nullptr), m_saveSearchAction(nullptr), m_optionsScrollArea(nullptr), @@ -355,11 +354,9 @@ closeButton->setToolTip(i18nc("@info:tooltip", "Quit searching")); connect(closeButton, &QToolButton::clicked, this, &DolphinSearchBox::emitCloseRequest); - // Create search label - m_searchLabel = new QLabel(this); - // Create search box m_searchInput = new QLineEdit(this); + m_searchInput->setPlaceholderText(i18n("Search...")); m_searchInput->installEventFilter(this); m_searchInput->setClearButtonEnabled(true); m_searchInput->setFont(QFontDatabase::systemFont(QFontDatabase::GeneralFont)); @@ -381,7 +378,6 @@ QHBoxLayout* searchInputLayout = new QHBoxLayout(); searchInputLayout->setContentsMargins(0, 0, 0, 0); searchInputLayout->addWidget(closeButton); - searchInputLayout->addWidget(m_searchLabel); searchInputLayout->addWidget(m_searchInput); // Create "Filename" and "Content" button