mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Add CTRL+P as a hotkey to open settings dialog
This commit is contained in:
parent
0b2b6a0dc7
commit
909154bd8b
|
@ -3,9 +3,11 @@
|
|||
#include "settingsmanager.h"
|
||||
#include "widgets/chatwidget.h"
|
||||
#include "widgets/notebook.h"
|
||||
#include "widgets/settingsdialog.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QPalette>
|
||||
#include <QShortcut>
|
||||
#include <QVBoxLayout>
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
|
@ -44,6 +46,15 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
setPalette(palette);
|
||||
|
||||
resize(1280, 800);
|
||||
|
||||
// Initialize program-wide hotkeys
|
||||
{
|
||||
// CTRL+P: Open Settings Dialog
|
||||
auto shortcut = new QShortcut(QKeySequence("CTRL+P"), this);
|
||||
connect(shortcut, &QShortcut::activated, []() {
|
||||
SettingsDialog::showDialog(); //
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
|
|
Loading…
Reference in a new issue