mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Add keybindings to tab context menu items (#3265)
Co-authored-by: Paweł <zneix@zneix.eu>
This commit is contained in:
parent
fa5a9fe831
commit
d8aa232df9
|
@ -36,9 +36,12 @@ Notebook::Notebook(QWidget *parent)
|
|||
|
||||
this->addButton_->setHidden(true);
|
||||
|
||||
this->menu_.addAction("Toggle visibility of tabs", [this]() {
|
||||
this->setShowTabs(!this->getShowTabs());
|
||||
});
|
||||
this->menu_.addAction(
|
||||
"Toggle visibility of tabs",
|
||||
[this]() {
|
||||
this->setShowTabs(!this->getShowTabs());
|
||||
},
|
||||
QKeySequence("Ctrl+U"));
|
||||
}
|
||||
|
||||
NotebookTab *Notebook::addPage(QWidget *page, QString title, bool select)
|
||||
|
|
|
@ -60,9 +60,12 @@ NotebookTab::NotebookTab(Notebook *notebook)
|
|||
this->showRenameDialog();
|
||||
});
|
||||
|
||||
this->menu_.addAction("Close Tab", [=]() {
|
||||
this->notebook_->removePage(this->page);
|
||||
});
|
||||
this->menu_.addAction(
|
||||
"Close Tab",
|
||||
[=]() {
|
||||
this->notebook_->removePage(this->page);
|
||||
},
|
||||
QKeySequence("Ctrl+Shift+W"));
|
||||
|
||||
this->menu_.addAction(
|
||||
"Popup Tab",
|
||||
|
@ -86,9 +89,12 @@ NotebookTab::NotebookTab(Notebook *notebook)
|
|||
|
||||
this->menu_.addSeparator();
|
||||
|
||||
this->menu_.addAction("Toggle visibility of tabs", [this]() {
|
||||
this->notebook_->setShowTabs(!this->notebook_->getShowTabs());
|
||||
});
|
||||
this->menu_.addAction(
|
||||
"Toggle visibility of tabs",
|
||||
[this]() {
|
||||
this->notebook_->setShowTabs(!this->notebook_->getShowTabs());
|
||||
},
|
||||
QKeySequence("Ctrl+U"));
|
||||
}
|
||||
|
||||
void NotebookTab::showRenameDialog()
|
||||
|
|
Loading…
Reference in a new issue