Verified Commit 6cd85ea7 authored by Carl Schwan's avatar Carl Schwan 🚴 Committed by Carl Schwan
Browse files

Use a searchbar similar to the one in okular using the webenginepart

Summary:
Similar to D19620 with khtml
{F6691009}

Test Plan: Build and run

Reviewers: #konqueror, stefanocrocco, dfaure

Reviewed By: #konqueror, dfaure

Subscribers: dfaure, GB_2, ndavis

Maniphest Tasks: T10258

Differential Revision: https://phabricator.kde.org/D19622
parent fd779bd7
......@@ -44,9 +44,13 @@ SearchBar::SearchBar(QWidget *parent)
// Initialize the user interface...
m_ui.setupUi(this);
m_ui.optionsButton->addAction(m_ui.actionMatchCase);
m_ui.optionsButton->addAction(m_ui.actionHighlightMatch);
m_ui.optionsButton->addAction(m_ui.actionSearchAutomatically);
m_optionsMenu = new QMenu();
m_optionsMenu->addAction(m_ui.actionMatchCase);
m_optionsMenu->addAction(m_ui.actionHighlightMatch);
m_optionsMenu->addAction(m_ui.actionSearchAutomatically);
m_ui.optionsButton->setMenu(m_optionsMenu);
m_ui.searchComboBox->lineEdit()->setPlaceholderText(i18n("Find..."));
m_ui.searchComboBox->lineEdit()->setClearButtonEnabled(true);
setFocusProxy(m_ui.searchComboBox);
......
......@@ -26,6 +26,7 @@
#define SEARCHBAR_P_H
#include <QWidget>
#include <QMenu>
#include "ui_searchbar.h"
......@@ -63,6 +64,7 @@ Q_SIGNALS:
private:
Ui::SearchBar m_ui;
QPointer<QWidget> m_focusWidget;
QMenu *m_optionsMenu;
};
#endif // SEARCHBAR_P_H
......@@ -30,21 +30,11 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="searchInfo">
<property name="text">
<string comment="label for input line to find text">&amp;Find:</string>
</property>
<property name="buddy">
<cstring>searchComboBox</cstring>
</property>
</widget>
</item>
<item>
<widget class="KHistoryComboBox" name="searchComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>10</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
......@@ -89,15 +79,15 @@
</widget>
</item>
<item>
<widget class="QToolButton" name="optionsButton">
<widget class="QPushButton" name="optionsButton">
<property name="toolTip">
<string>Find the previous match for the current search phrase</string>
</property>
<property name="text">
<string>&amp;Options</string>
</property>
<property name="popupMode">
<enum>QToolButton::InstantPopup</enum>
<property name="icon">
<iconset theme="settings-configure" />
</property>
</widget>
</item>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment