From 9cabdf297441563a66a2da071774e7473414a562 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Mon, 10 Aug 2026 01:27:27 -0500 Subject: [PATCH] Revert the pixel-perfect scale change GetPerfectPixel switched to UIParent:GetEffectiveScale(), which reports the true unclamped scale (e.g. 1.42 on the larger pixelperfect presets, since the module calls UIParent:SetScale past the uiScale cvar's 1.0 cap). At that scale 768/screenheight/scale drops below half a pixel and the border edgeSize rounds to zero, so button borders disappeared. The uiScale cvar's <=1.0 cap was load-bearing, not a bug: it keeps the 1px borders from vanishing. Restore the cvar-based measurement and move pixelperfect back to its original load position. --- api/api.lua | 15 ++++----------- init/modules.xml | 4 +--- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/api/api.lua b/api/api.lua index 51adaff6..7b05b7c0 100644 --- a/api/api.lua +++ b/api/api.lua @@ -1108,17 +1108,10 @@ end function pfUI.api.GetPerfectPixel() if pfUI.pixel then return pfUI.pixel end - local resolution = GetCVar("gxResolution") or "" - local _, _, screenheight = strfind(resolution, "x(%d+)") - screenheight = tonumber(screenheight) - - if pfUI_config.appearance.border.pixelperfect == "1" and screenheight then - -- The uiScale cvar is not a reliable source: it is capped at 1.0 while both - -- the pixelperfect module and the firstrun slider push UIParent past it via - -- SetScale, and it is ignored completely while useUiScale is off. Ask the - -- frame itself instead, it always reports what is really on screen. - local scale = UIParent:GetEffectiveScale() - if not scale or scale <= 0 then scale = 1 end + if pfUI_config.appearance.border.pixelperfect == "1" then + local scale = GetCVar("useUiScale") == "1" and GetCVar("uiScale") or "1" + local resolution = GetCVar("gxResolution") + local _, _, screenwidth, screenheight = strfind(resolution, "(.+)x(.+)") pfUI.pixel = 768 / screenheight / scale pfUI.pixel = pfUI.pixel > 1 and 1 or pfUI.pixel diff --git a/init/modules.xml b/init/modules.xml index e7a32b38..c9b0069f 100644 --- a/init/modules.xml +++ b/init/modules.xml @@ -1,7 +1,4 @@ - - @@ -56,6 +53,7 @@ +