From 2352f1c6edd0f8dccc3e41953d535275fecfc963 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Thu, 30 Jul 2026 13:51:52 -0500 Subject: [PATCH] Use GetSize/SetSize for map frame and buttons Replace separate GetWidth/GetHeight and SetWidth/SetHeight calls with GetSize and SetSize in modules/map.lua. --- modules/map.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/map.lua b/modules/map.lua index f8738b27..ed0d50ca 100644 --- a/modules/map.lua +++ b/modules/map.lua @@ -103,8 +103,8 @@ pfUI:RegisterModule("map", function () WorldMapFrame:ClearAllPoints() WorldMapFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 0) - WorldMapFrame:SetWidth(WorldMapButton:GetWidth() + 15) - WorldMapFrame:SetHeight(WorldMapButton:GetHeight() + 55) + local wmWidth, wmHeight = WorldMapButton:GetSize() + WorldMapFrame:SetSize(wmWidth + 15, wmHeight + 55) LoadMovable(WorldMapFrame) -- skin @@ -126,8 +126,7 @@ pfUI:RegisterModule("map", function () btn:SetHighlightTexture("") btn.text = _G["pfUI_map_autozoneswitchText"] CreateBackdrop(btn, nil, true) - btn:SetWidth(14) - btn:SetHeight(14) + btn:SetSize(14, 14) btn:SetPoint("RIGHT", WorldMapContinentDropDown, "LEFT", -8, 2) btn.text:ClearAllPoints() btn.text:SetPoint("RIGHT", btn, "LEFT", -4, 1) @@ -165,8 +164,7 @@ pfUI:RegisterModule("map", function () WorldMapButton.coords.text:SetJustifyH("RIGHT") WorldMapButton.coords:SetScript("OnUpdate", function() - local width = WorldMapButton:GetWidth() - local height = WorldMapButton:GetHeight() + local width, height = WorldMapButton:GetSize() local mx, my = WorldMapButton:GetCenter() local scale = WorldMapButton:GetEffectiveScale() local x, y = GetCursorPosition()