1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Added focus for searchbar in history sidebar & bookmark sidebar

Summary:
After Adding Focus , user can directly search after pressing ctrl+h in history sidebar
& ctrl+shift+b in bookmark sidebar
BUG: 393948

Reviewers: #falkon, drosca

Reviewed By: #falkon, drosca

Subscribers: SGOrava, falkon, #falkon

Tags: #falkon

Differential Revision: https://phabricator.kde.org/D20022
This commit is contained in:
Saish Mhatre 2019-04-10 17:10:13 +02:00 committed by David Rosca
parent ae495bcc60
commit e66835b4bf
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
4 changed files with 16 additions and 0 deletions

View File

@ -134,3 +134,9 @@ void BookmarksSidebar::createContextMenu(const QPoint &pos)
menu.exec(pos);
}
void BookmarksSidebar::showEvent(QShowEvent *event)
{
QWidget::showEvent(event);
ui->search->setFocus();
}

View File

@ -53,6 +53,8 @@ private Q_SLOTS:
void createContextMenu(const QPoint &pos);
private:
void showEvent(QShowEvent *event) override;
Ui::BookmarksSideBar* ui;
BrowserWindow* m_window;
Bookmarks* m_bookmarks;

View File

@ -103,6 +103,12 @@ void HistorySideBar::createContextMenu(const QPoint &pos)
menu.exec(pos);
}
void HistorySideBar::showEvent(QShowEvent *event)
{
QWidget::showEvent(event);
ui->search->setFocus();
}
HistorySideBar::~HistorySideBar()
{
delete ui;

View File

@ -51,6 +51,8 @@ private Q_SLOTS:
void createContextMenu(const QPoint &pos);
private:
void showEvent(QShowEvent *event) override;
Ui::HistorySideBar* ui;
BrowserWindow* m_window;
};