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.
This commit is contained in:
Brues
2026-08-10 01:27:27 -05:00
parent b6931359b0
commit 9cabdf2974
2 changed files with 5 additions and 14 deletions
+4 -11
View File
@@ -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