Improvements to the quick switcher (#109)
- Ghetto disambiguation for the quick switcher - Fix the Ctrl+K shortcut - Fix keyboard focus when the quick switcher is closed fixes #114
This commit is contained in:
parent
beda0db543
commit
13cb0521fa
6 changed files with 31 additions and 13 deletions
|
|
@ -114,6 +114,11 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
QShortcut *quitShortcut = new QShortcut(QKeySequence::Quit, this);
|
||||
connect(quitShortcut, &QShortcut::activated, this, QApplication::quit);
|
||||
|
||||
QShortcut *quickSwitchShortcut = new QShortcut(QKeySequence("Ctrl+K"), this);
|
||||
connect(quickSwitchShortcut, &QShortcut::activated, this, [=]() {
|
||||
chat_page_->showQuickSwitcher();
|
||||
});
|
||||
|
||||
QSettings settings;
|
||||
|
||||
trayIcon_->setVisible(userSettings_->isTrayEnabled());
|
||||
|
|
@ -127,15 +132,6 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
MainWindow::keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
if ((e->key() == Qt::Key_K) && (e->modifiers().testFlag(Qt::ControlModifier)))
|
||||
chat_page_->showQuickSwitcher();
|
||||
else
|
||||
QMainWindow::keyPressEvent(e);
|
||||
}
|
||||
|
||||
void
|
||||
MainWindow::restoreWindowSize()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue