fix mainwindow fullscreen

This commit is contained in:
shun-iwasawa 2021-03-17 10:06:19 +09:00 committed by manongjohn
parent 43955919e6
commit 105c4111d9

View file

@ -55,6 +55,9 @@
#include <QPushButton>
#include <QLabel>
#include <QMessageBox>
#ifdef _WIN32
#include <QtPlatformHeaders/QWindowsWindowFunctions>
#endif
TEnv::IntVar ViewCameraToggleAction("ViewCameraToggleAction", 1);
TEnv::IntVar ViewTableToggleAction("ViewTableToggleAction", 0);
@ -1263,9 +1266,16 @@ void MainWindow::maximizePanel() {
void MainWindow::fullScreenWindow() {
if (isFullScreen())
setWindowState(Qt::WindowMaximized);
else
setWindowState(Qt::WindowFullScreen);
showNormal();
else {
#if defined(_WIN32)
// http://doc.qt.io/qt-5/windows-issues.html#fullscreen-opengl-based-windows
this->winId();
QWindowsWindowFunctions::setHasBorderInFullScreen(this->windowHandle(),
true);
#endif
this->showFullScreen();
}
}
//-----------------------------------------------------------------------------