qtquick: Don't use native windows drop shadow with round corners
When using the Windows native drop shadow, the client area needs to be rectangular, otherwise a white line appears at the top
This commit is contained in:
@@ -537,9 +537,15 @@ void WidgetResizeHandler::setupWindow(QWindow *window)
|
||||
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);
|
||||
const bool usesTransparentFloatingWindow =
|
||||
Config::self().internalFlags() & Config::InternalFlag_UseTransparentFloatingWindow;
|
||||
if (!usesTransparentFloatingWindow) {
|
||||
// This enables the native drop shadow.
|
||||
// Doesn't work well if the floating window has transparent round corners (shows weird white line).
|
||||
|
||||
MARGINS margins = { 0, 0, 0, 1 }; // arbitrary, just needs to be > 0 it seems
|
||||
DwmExtendFrameIntoClientArea(wid, &margins);
|
||||
}
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(window);
|
||||
|
||||
Reference in New Issue
Block a user