From b233dc9e1a4e525804ba6c71c67a44c1e190622e Mon Sep 17 00:00:00 2001 From: shagu Date: Tue, 14 Jun 2022 18:31:32 +0200 Subject: [PATCH] api: adjust autohide speed on high frame rates --- api/api.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/api.lua b/api/api.lua index 2b2d25b2..49a6edea 100644 --- a/api/api.lua +++ b/api/api.lua @@ -1156,7 +1156,8 @@ function pfUI.api.EnableAutohide(frame, timeout) this.parent:SetAlpha(1) elseif this.activeTo then if this.activeTo < GetTime() and this.parent:GetAlpha() > 0 then - this.parent:SetAlpha(this.parent:GetAlpha() - 0.1) + local fps = (60 / math.max(GetFramerate(), 1)) + this.parent:SetAlpha(this.parent:GetAlpha() - 0.05*fps) end else this.activeTo = GetTime() + timeout