Implement a system that resizes the ghost widget appropriately to avoid undefined behavior due to it being moved into the gap between screens caused by scaling.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
This commit is contained in:
@@ -1615,14 +1615,16 @@ namespace AzQtComponents
|
||||
}
|
||||
|
||||
// Handle snapping to the screen edges/other floating windows while dragging
|
||||
QScreen* screen = Utilities::ScreenAtPoint(globalPos);
|
||||
QScreen* screen = QApplication::screenAt(globalPos);
|
||||
|
||||
AdjustForSnapping(placeholder, screen);
|
||||
if (screen)
|
||||
{
|
||||
AdjustForSnapping(placeholder, screen);
|
||||
m_state.setPlaceholder(placeholder, screen);
|
||||
|
||||
m_state.setPlaceholder(placeholder, screen);
|
||||
|
||||
m_ghostWidget->Enable();
|
||||
RepaintFloatingIndicators();
|
||||
m_ghostWidget->Enable();
|
||||
RepaintFloatingIndicators();
|
||||
}
|
||||
}
|
||||
|
||||
return m_dropZoneState.dragging();
|
||||
|
||||
Reference in New Issue
Block a user