diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 7da72e569..017e19ee3 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -1474,7 +1474,7 @@ void MainWindow::on_actionFullscreen_triggered() { questionbox.exec(); config_save(); - /* (re-capture mouse after dialog. */ + /* (re-capture mouse after dialog). */ if (wasCaptured) emit setMouseCapture(true); } @@ -1915,6 +1915,8 @@ void MainWindow::on_actionHiDPI_scaling_triggered() void MainWindow::on_actionHide_status_bar_triggered() { + auto w = ui->stackedWidget->width(); + auto h = ui->stackedWidget->height(); hide_status_bar ^= 1; ui->actionHide_status_bar->setChecked(hide_status_bar); statusBar()->setVisible(!hide_status_bar); @@ -1926,13 +1928,16 @@ void MainWindow::on_actionHide_status_bar_triggered() } else { int vid_resize_orig = vid_resize; vid_resize = 0; - emit resizeContents(monitors[0].mon_scrnsz_x, monitors[0].mon_scrnsz_y); + emit resizeContents(w, h); vid_resize = vid_resize_orig; + if (vid_resize == 1) setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); } } void MainWindow::on_actionHide_tool_bar_triggered() { + auto w = ui->stackedWidget->width(); + auto h = ui->stackedWidget->height(); hide_tool_bar ^= 1; ui->actionHide_tool_bar->setChecked(hide_tool_bar); ui->toolBar->setVisible(!hide_tool_bar); @@ -1944,8 +1949,9 @@ void MainWindow::on_actionHide_tool_bar_triggered() } else { int vid_resize_orig = vid_resize; vid_resize = 0; - emit resizeContents(monitors[0].mon_scrnsz_x, monitors[0].mon_scrnsz_y); + emit resizeContents(w, h); vid_resize = vid_resize_orig; + if (vid_resize == 1) setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); } }