aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow/subwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow/subwindow.cpp')
-rw-r--r--src/mainwindow/subwindow.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mainwindow/subwindow.cpp b/src/mainwindow/subwindow.cpp
index 342fce8..bdb852a 100644
--- a/src/mainwindow/subwindow.cpp
+++ b/src/mainwindow/subwindow.cpp
@@ -86,6 +86,15 @@ SubWindow::SubWindow(const std::unique_ptr<Configuration> &config, QWidget *pare
tabWidget->setCurrentIndex(qMin(tabWidget->currentIndex() + 1, tabWidget->count() - 1));
});
+ auto *fullScreen_shortcut = new QShortcut(QKeySequence(config->value<QString>("window.shortcuts.fullscreen").value()), this);
+ connect(fullScreen_shortcut, &QShortcut::activated, this, [=]() {
+ auto *w = this->window();
+ if(w->isFullScreen())
+ w->showNormal();
+ else
+ w->showFullScreen();
+ });
+
connect(tabWidget, &TabWidget::currentChanged, [this](int index) {
if(index < 0) {
// last tab has been closed