mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
[popupwindow] Show minimal version of search toolbar.
Also set minimumWidth.
This commit is contained in:
parent
67d1a8af84
commit
c9bcf15f9b
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -41,6 +41,7 @@ public:
|
|||
~SearchToolBar();
|
||||
|
||||
void setWebView(WebView* view);
|
||||
void showMinimalInPopupWindow();
|
||||
|
||||
void focusSearchLine();
|
||||
bool eventFilter(QObject* obj, QEvent* event);
|
||||
|
|
|
@ -114,13 +114,10 @@
|
|||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
<width>5</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
|
Loading…
Reference in New Issue
Block a user