From 4de524e7faa684305d9fd02549e454fd7b3c811e Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Thu, 20 Dec 2018 15:09:28 +1100 Subject: [PATCH] added full screen mode #171 --- mainwindow.cpp | 11 +++++++++++ mainwindow.h | 1 + mainwindow.ui | 13 +++++++++++++ 3 files changed, 25 insertions(+) diff --git a/mainwindow.cpp b/mainwindow.cpp index 7987b1e51..b317aa017 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -223,6 +223,7 @@ MainWindow::MainWindow(QWidget *parent) : connect(ui->actionCop_y, SIGNAL(triggered(bool)), this, SLOT(copy())); connect(ui->action_Paste, SIGNAL(triggered(bool)), this, SLOT(paste())); connect(ui->actionProject, SIGNAL(triggered(bool)), this, SLOT(new_project())); + connect(ui->actionFull_Screen, SIGNAL(triggered(bool)), this, SLOT(toggle_full_screen())); } MainWindow::~MainWindow() { @@ -677,6 +678,8 @@ void MainWindow::viewMenu_About_To_Be_Shown() { ui->action4_3->setChecked(config.show_title_safe_area && config.use_custom_title_safe_ratio && config.custom_title_safe_ratio == 4.0/3.0); ui->action16_9->setChecked(config.show_title_safe_area && config.use_custom_title_safe_ratio && config.custom_title_safe_ratio == 16.0/9.0); ui->actionCustom->setChecked(config.show_title_safe_area && config.use_custom_title_safe_ratio && !ui->action4_3->isChecked() && !ui->action16_9->isChecked()); + + ui->actionFull_Screen->setChecked(windowState() == Qt::WindowFullScreen); } void MainWindow::on_actionFrames_triggered() @@ -826,6 +829,14 @@ void MainWindow::on_actionClear_In_Out_triggered() { } } +void MainWindow::toggle_full_screen() { + if (windowState() == Qt::WindowFullScreen) { + setWindowState(Qt::WindowMaximized); + } else { + setWindowState(Qt::WindowFullScreen); + } +} + void MainWindow::on_actionDelete_In_Out_triggered() { if (panel_timeline->focused()) { diff --git a/mainwindow.h b/mainwindow.h index fafdfe1b1..048c30a7b 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -32,6 +32,7 @@ public slots: void autorecover_interval(); void on_actionNest_triggered(); void on_actionClear_In_Out_triggered(); + void toggle_full_screen(); protected: void closeEvent(QCloseEvent *); diff --git a/mainwindow.ui b/mainwindow.ui index 9e18008f4..61cc110c8 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -147,6 +147,8 @@ + + @@ -934,6 +936,17 @@ Enable Hover Focus for Zooming + + + true + + + Full Screen + + + F11 + +