mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-23 12:09:50 +00:00
Coins: focus searchbar on toggle
This commit is contained in:
parent
3b06ca4b17
commit
18cb8e2132
3 changed files with 8 additions and 0 deletions
|
@ -93,6 +93,11 @@ void CoinsWidget::setSearchbarVisible(bool visible) {
|
||||||
ui->search->setVisible(visible);
|
ui->search->setVisible(visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CoinsWidget::focusSearchbar() {
|
||||||
|
ui->search->setFocusPolicy(Qt::StrongFocus);
|
||||||
|
ui->search->setFocus();
|
||||||
|
}
|
||||||
|
|
||||||
void CoinsWidget::showContextMenu(const QPoint &point) {
|
void CoinsWidget::showContextMenu(const QPoint &point) {
|
||||||
QModelIndexList list = ui->coins->selectionModel()->selectedRows();
|
QModelIndexList list = ui->coins->selectionModel()->selectedRows();
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ public:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setSearchbarVisible(bool visible);
|
void setSearchbarVisible(bool visible);
|
||||||
|
void focusSearchbar();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void showHeaderMenu(const QPoint& position);
|
void showHeaderMenu(const QPoint& position);
|
||||||
|
|
|
@ -1483,6 +1483,8 @@ void MainWindow::toggleSearchbar(bool visible) {
|
||||||
m_contactsWidget->focusSearchbar();
|
m_contactsWidget->focusSearchbar();
|
||||||
else if (currentTab == Tabs::RECEIVE)
|
else if (currentTab == Tabs::RECEIVE)
|
||||||
m_receiveWidget->focusSearchbar();
|
m_receiveWidget->focusSearchbar();
|
||||||
|
else if (currentTab == Tabs::COINS)
|
||||||
|
m_coinsWidget->focusSearchbar();
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow() = default;
|
MainWindow::~MainWindow() = default;
|
Loading…
Reference in a new issue