From 805a8259a1fdb7ce04681662e6c86856b5e43424 Mon Sep 17 00:00:00 2001 From: Gaspar Capello Date: Mon, 6 May 2024 09:28:18 -0300 Subject: [PATCH] Fix wrong alignment between mouse and sensor threshold position (fix #4428) --- src/app/ui/dynamics_popup.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/ui/dynamics_popup.cpp b/src/app/ui/dynamics_popup.cpp index c2e3dda96..bdaa3d42a 100644 --- a/src/app/ui/dynamics_popup.cpp +++ b/src/app/ui/dynamics_popup.cpp @@ -1,5 +1,5 @@ // Aseprite -// Copyright (C) 2020-2023 Igara Studio S.A. +// Copyright (C) 2020-2024 Igara Studio S.A. // // This program is distributed under the terms of // the End-User License Agreement for Aseprite. @@ -166,7 +166,9 @@ private: break; auto mouseMsg = static_cast(msg); - const gfx::Rect rc = bounds(); + gfx::Rect rc = bounds(); + rc.shrink(border()); + rc.shrink(gfx::Border(3, 0, 3, 1) * guiscale()); float u = (mouseMsg->position().x - rc.x) / float(rc.w); u = std::clamp(u, 0.0f, 1.0f); switch (capture) {