Compare commits

...

4 Commits

Author SHA1 Message Date
Sergio Martins
f674aa27a9 Enable the Aero-snap paths on Windows 8
Even if it's not actually aero snap the native resize is quite good.
2022-04-28 17:47:20 +01:00
Sergio Martins
5f78110025 qtquick: Fix calling QWindow::setTitle()
For QtWidgets, it happens fine in FloatingWindow's constructor,
because we get the corresponding QWindow already. But for QtQuick
the QWindow is only created afterwards, so we have to delay
setting the title.
2021-04-29 17:21:03 +01:00
Sergio Martins
ca3c49f32d Remove a bogus setWindowTitle()
Setting a widget would change the top-level window title!
By luck people set the widget before docking, but doesn't have
to be that way.
2021-04-29 16:25:07 +01:00
Sergio Martins
def6a0a6b2 windows: Fix white line appearing at the top when using round corners
Don't call DwmExtendFrameIntoClientArea if we have round corners.
The client area needs to be rectangular
2021-04-23 12:23:03 +01:00
4 changed files with 4 additions and 8 deletions

View File

@@ -250,8 +250,8 @@ QQmlEngine *Config::qmlEngine() const
void Config::Private::fixFlags()
{
#if defined(Q_OS_WIN)
if (QOperatingSystemVersion::current().majorVersion() < 10) {
// Aero-snap requires Windows 10
if (QOperatingSystemVersion::current().majorVersion() < 8) {
// Untested on Windows 7. Windows 8 doesn't have aerosnap but at least it can get native resizing
m_flags = m_flags & ~Flag_AeroSnapWithClientDecos;
} else {
// Unconditional now

View File

@@ -154,7 +154,6 @@ void DockWidgetBase::setWidget(QWidgetOrQuick *w)
setSizePolicy(w->sizePolicy());
Q_EMIT widgetChanged(w);
setWindowTitle(uniqueName());
}
QWidgetOrQuick *DockWidgetBase::widget() const
@@ -556,7 +555,6 @@ void DockWidgetBase::Private::updateTitle()
if (q->isFloating())
q->window()->setWindowTitle(title);
toggleAction->setText(title);
}

View File

@@ -536,10 +536,6 @@ void WidgetResizeHandler::setupWindow(QWindow *window)
SetWindowPos(wid, 0, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
});
// Show drop-shadow:
MARGINS margins = { 0, 0, 0, 1 }; // arbitrary, just needs to be > 0 it seems
DwmExtendFrameIntoClientArea(wid, &margins);
}
#else
Q_UNUSED(window);

View File

@@ -205,5 +205,7 @@ void FloatingWindowQuick::init()
m_quickWindow->setFlags(windowFlags());
updateTitleAndIcon();
m_quickWindow->show();
}