diff --git a/src/lib/popupwindow/popupwindow.cpp b/src/lib/popupwindow/popupwindow.cpp
index 0db49ee6c..d06e103cb 100644
--- a/src/lib/popupwindow/popupwindow.cpp
+++ b/src/lib/popupwindow/popupwindow.cpp
@@ -255,6 +255,7 @@ void PopupWindow::searchOnPage()
{
if (!m_search) {
m_search = new SearchToolBar(m_view, this);
+ m_search.data()->showMinimalInPopupWindow();
m_layout->insertWidget(m_layout->count() - 1, m_search);
}
diff --git a/src/lib/webview/searchtoolbar.cpp b/src/lib/webview/searchtoolbar.cpp
index f3e3e0270..3fe1c683d 100644
--- a/src/lib/webview/searchtoolbar.cpp
+++ b/src/lib/webview/searchtoolbar.cpp
@@ -60,6 +60,17 @@ void SearchToolBar::setWebView(WebView* view)
m_view = view;
}
+void SearchToolBar::showMinimalInPopupWindow()
+{
+ // Show only essentials widget + set minimum width
+ ui->highligh->hide();
+ ui->caseSensitive->hide();
+ ui->results->hide();
+ ui->horizontalLayout->setSpacing(2);
+ ui->horizontalLayout->setContentsMargins(2, 6, 2, 6);
+ setMinimumWidth(260);
+}
+
void SearchToolBar::focusSearchLine()
{
ui->lineEdit->setFocus();
diff --git a/src/lib/webview/searchtoolbar.h b/src/lib/webview/searchtoolbar.h
index a13a25726..932964645 100644
--- a/src/lib/webview/searchtoolbar.h
+++ b/src/lib/webview/searchtoolbar.h
@@ -41,6 +41,7 @@ public:
~SearchToolBar();
void setWebView(WebView* view);
+ void showMinimalInPopupWindow();
void focusSearchLine();
bool eventFilter(QObject* obj, QEvent* event);
diff --git a/src/lib/webview/searchtoolbar.ui b/src/lib/webview/searchtoolbar.ui
index df39176d1..dec93784a 100644
--- a/src/lib/webview/searchtoolbar.ui
+++ b/src/lib/webview/searchtoolbar.ui
@@ -114,13 +114,10 @@
Qt::Horizontal
-
- QSizePolicy::MinimumExpanding
-
- 40
- 20
+ 5
+ 1