Android: Fix QtTextureView inverted opacity condition

The Android TextureView class wants to know whether the view is
opaque, while the condition has been evaluating whether it should be
transparent. Invert the condition to let Android know correctly whether
the TextureView should have transparency.

Pick-to: 6.7
Change-Id: Ic636f78dd3c691e85456c579e4559b8bc7a077a2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
Tinja Paavoseppä 2024-01-26 13:04:26 +02:00
parent cadc239c48
commit 8b601e6dbe

View File

@ -253,7 +253,7 @@ void QAndroidPlatformWindow::createSurface()
}
const bool windowStaysOnTop = bool(window()->flags() & Qt::WindowStaysOnTopHint);
const bool isOpaque = format().hasAlpha() || (0.0 < window()->opacity() < 1.0);
const bool isOpaque = !format().hasAlpha() && qFuzzyCompare(window()->opacity(), 1.0);
m_nativeQtWindow.callMethod<void>("createSurface", windowStaysOnTop, x, y, w, h, 32, isOpaque,
m_surfaceContainerType);