1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Use a searchbar similar to the one in okular

Summary: {F6674717}

Reviewers: #falkon, #vdg, drosca

Reviewed By: #falkon, drosca

Subscribers: drosca, loh.tar, SGOrava, falkon

Tags: #falkon

Differential Revision: https://phabricator.kde.org/D19625
This commit is contained in:
Carl Schwan 2019-03-08 22:30:49 +01:00
parent 945b4f7626
commit 9601e8ad34
No known key found for this signature in database
GPG Key ID: 2E102E8C54ED43DC
2 changed files with 31 additions and 44 deletions

View File

@ -35,9 +35,7 @@ SearchToolBar::SearchToolBar(WebView* view, QWidget* parent)
ui->setupUi(this); ui->setupUi(this);
ui->closeButton->setIcon(IconProvider::instance()->standardIcon(QStyle::SP_DialogCloseButton)); ui->closeButton->setIcon(IconProvider::instance()->standardIcon(QStyle::SP_DialogCloseButton));
ui->next->setIcon(IconProvider::instance()->standardIcon(QStyle::SP_ArrowDown));
ui->next->setShortcut(QKeySequence("Ctrl+G")); ui->next->setShortcut(QKeySequence("Ctrl+G"));
ui->previous->setIcon(IconProvider::instance()->standardIcon(QStyle::SP_ArrowUp));
ui->previous->setShortcut(QKeySequence("Ctrl+Shift+G")); ui->previous->setShortcut(QKeySequence("Ctrl+Shift+G"));
connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(close())); connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(close()));

View File

@ -30,13 +30,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Search: </string>
</property>
</widget>
</item>
<item> <item>
<widget class="FocusSelectLineEdit" name="lineEdit"> <widget class="FocusSelectLineEdit" name="lineEdit">
<property name="minimumSize"> <property name="minimumSize">
@ -47,43 +40,52 @@
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>200</width> <width>16777215</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="placeholderText"> <property name="placeholderText">
<string>Search...</string> <string>Find...</string>
</property> </property>
</widget> <property name="clearButtonEnabled">
</item>
<item>
<widget class="MacToolButton" name="previous">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="autoRaise">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="MacToolButton" name="next"> <widget class="QToolButton" name="next">
<property name="sizePolicy"> <property name="toolTip">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <string>Find the next match for the current search phrase</string>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="autoRaise"> <property name="text">
<bool>true</bool> <string>&amp;Next</string>
</property>
<property name="icon">
<iconset theme="go-down-search"/>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="MacToolButton" name="caseSensitive"> <widget class="QToolButton" name="previous">
<property name="toolTip">
<string>Find the previous match for the current search phrase</string>
</property>
<property name="text">
<string>&amp;Previous</string>
</property>
<property name="icon">
<iconset theme="go-up-search"/>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="caseSensitive">
<property name="text"> <property name="text">
<string>&amp;Match Case</string> <string>&amp;Match Case</string>
</property> </property>
@ -99,19 +101,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>