From a9091b0a72572f05f5871b26a3231d678fc10bb8 Mon Sep 17 00:00:00 2001 From: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> Date: Wed, 15 Sep 2021 15:47:23 -0700 Subject: [PATCH] Minor changes to comments Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> --- .../AzQtComponents/Components/FancyDockingGhostWidget.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingGhostWidget.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingGhostWidget.cpp index d259b28636..fd20f4d125 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingGhostWidget.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingGhostWidget.cpp @@ -81,9 +81,8 @@ namespace AzQtComponents QScreen* pointScreen = QApplication::screenAt(midPoint); QRect rect(targetRect); - // On environment with multiple screens with different scaling settings, the screen coordinate system may have gaps - // due to the screen real estate shrinking according to the scale. When that happens, if a widget is moved into the gap - // it will resize and translate with undefined behavior, causing a lot of jitter and flashes. + // In environments with multiple screens the screen coordinate system may have gaps, especially when different scaling settings + // are involved. When that happens, if a widget is moved into the gap it will resize and translate with undefined behavior. // To prevent this, whenever the widget would end up outside screen boundaries, we resize the widget to be twice its // original size so that the center of the widget is back inside the screen boundaries, and set the ghost widget // to paint the widget pixmap at half the previous size to make the process seamless. @@ -117,6 +116,8 @@ namespace AzQtComponents setPixmapVisible(true); if (needsRepaint) { + // We use repaint instead of update since the latter has a delay of 1 frame, + // which would cause the ghost widget to flicker when changing paint mode. repaint(); } }