From 39491663eed20670af88195c212accd8a875fa08 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Perrier Date: Mon, 21 Dec 2020 17:25:10 +0100 Subject: [PATCH] Fix flashing tooltip. --- Source/Engine/UI/GUI/Tooltip.cs | 2 +- Source/Engine/UI/GUI/WindowRootControl.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Engine/UI/GUI/Tooltip.cs b/Source/Engine/UI/GUI/Tooltip.cs index 460fddb6f..d0f78227d 100644 --- a/Source/Engine/UI/GUI/Tooltip.cs +++ b/Source/Engine/UI/GUI/Tooltip.cs @@ -194,7 +194,7 @@ namespace FlaxEngine.GUI { // Auto hide if mouse leaves control area Vector2 mousePos = Input.MouseScreenPosition; - Vector2 location = _showTarget.ScreenToClient(mousePos / Platform.DpiScale); + Vector2 location = _showTarget.ScreenToClient(mousePos); if (!_showTarget.OnTestTooltipOverControl(ref location)) { // Mouse left or sth diff --git a/Source/Engine/UI/GUI/WindowRootControl.cs b/Source/Engine/UI/GUI/WindowRootControl.cs index 10e48baa5..eb4e1b85c 100644 --- a/Source/Engine/UI/GUI/WindowRootControl.cs +++ b/Source/Engine/UI/GUI/WindowRootControl.cs @@ -234,7 +234,7 @@ namespace FlaxEngine.GUI /// public override Vector2 ScreenToClient(Vector2 location) { - return _window.ScreenToClient(location); + return _window.ScreenToClient(location) / Platform.DpiScale; } ///