partially revert 50170eb for the maximize shortcut on Windows

Since the workaround actually doesn't work, so we
remain the old behavior unchanged.
This commit is contained in:
Gary Wang 2021-02-19 19:22:47 +08:00
parent 50170eb4aa
commit 7a69bb2fa2

View File

@ -11,10 +11,11 @@ FramelessWindow::FramelessWindow(QWidget *parent)
: QWidget(parent) : QWidget(parent)
, m_centralLayout(new QVBoxLayout(this)) , m_centralLayout(new QVBoxLayout(this))
{ {
// A frameless window has the Qt::WindowTitleHint flag seems wrong, // We should use Qt::WindowMinMaxButtonsHint here but there is a bug in Qt
// but it's a workaround of the following bug (also see the focused comment): // that will make pressing Meta+Up cause the app fullscreen under Windows,
// https://bugreports.qt.io/browse/QTBUG-8361?focusedCommentId=542002#comment-542002 // so for now we only use the Qt::WindowMinimizeButtonHint flag here.
this->setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::FramelessWindowHint); // https://bugreports.qt.io/browse/QTBUG-91226
this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint);
m_centralLayout->setMargin(0); m_centralLayout->setMargin(0);
} }