Commit 8d5e5495 authored by Andreas Traczyk's avatar Andreas Traczyk Committed by Adrien Béraud

videocall: fix overlay not rendering at max opacity

- fixes a known Qt bug present on macOS and windows that prevents
  rendering of widgets when a QGraphicsOpacityEffect with an
  opacity of 1.0 is attached.

Change-Id: Ib287e9c48b66d699c427165f8c5ce7a55558b307
parent 513c2a48
......@@ -49,7 +49,7 @@ VideoView::VideoView(QWidget* parent) :
overlay_ = new VideoOverlay(this);
auto effect = new QGraphicsOpacityEffect(overlay_);
fadeAnim_ = new QPropertyAnimation(this);
......@@ -68,10 +68,18 @@ private:
bool draggingPreview_ = false;
bool resizingPreview_ = false;
constexpr static int fadeOverlayTime_ = 2000; //msec
constexpr static int fadeOverlayTime_ = 1000; //msec
constexpr static int resizeGrip_ = 40;
constexpr static int minimalSize_ = 100;
// TODO: fix when changing Qt version
// Full(1.0) opacity bug affecting many Qt version (macOS + win10)
// causing the render to take a buggy code path which can be avoided
// by using opacity values other than precisely 1.0.
constexpr static qreal maxOverlayOpacity_ = 0.9999999999980000442;
void toggleFullScreen();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment