qtquick: Config::InternalFlag_UseTransparentFloatingWindow

Don't use a transparent floating window by default.
This matches QtWidgets behaviour.

It's only use would be to get round corners, but doesn't work well
with Window's drop shadow
This commit is contained in:
Sergio Martins
2021-04-23 11:39:57 +01:00
parent 26f7557834
commit df0a80b320
2 changed files with 4 additions and 2 deletions

View File

@@ -106,7 +106,8 @@ public:
InternalFlag_NoAeroSnap = 1, ///< Only for development. Disables Aero-snap.
InternalFlag_DontUseParentForFloatingWindows = 2, ///< FloatingWindows won't have a parent top-level.
InternalFlag_DontUseQtToolWindowsForFloatingWindows = 4, ///< FloatingWindows will use Qt::Window instead of Qt::Tool.
InternalFlag_DontShowWhenUnfloatingHiddenWindow = 8 ///< DockWidget::setFloating(false) won't do anything if the window is hidden.
InternalFlag_DontShowWhenUnfloatingHiddenWindow = 8, ///< DockWidget::setFloating(false) won't do anything if the window is hidden.
InternalFlag_UseTransparentFloatingWindow = 16 ///< For QtQuick only. Allows to have round-corners. It's flaky when used with native Windows drop-shadow.
};
Q_DECLARE_FLAGS(InternalFlags, InternalFlag)

View File

@@ -33,7 +33,8 @@ public:
: QQuickView(Config::self().qmlEngine(), nullptr)
, m_floatingWindow(floatingWindow)
{
setColor(QColor(Qt::transparent));
if (Config::self().internalFlags() & Config::InternalFlag_UseTransparentFloatingWindow)
setColor(QColor(Qt::transparent));
updateSize();