aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-08-05 16:04:08 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-08-05 16:04:08 +0200
commitbaf6016953a5713f302e6ed4feaa8e338499a85c (patch)
treeefe1604675b27cb5db187eab554a01cc38e96e95 /src/mainwindow
parentUpdate manpage (diff)
downloadsmolbote-baf6016953a5713f302e6ed4feaa8e338499a85c.tar.xz
Fix fullscreen toggle
Diffstat (limited to 'src/mainwindow')
-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