From 19354bdf5bc87881365b9302992add0d0c48291a Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 9 Jan 2023 19:14:49 +0100 Subject: [PATCH] addonbuttons: remove effective scale calculations Using the effective scale of the minimap leads to very small icons after /rl, if the minimap scale has been touched before the addon buttons module initialized. Removing the effective scale calculation didn't seem to break anything so far during my tests. --- modules/addonbuttons.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/addonbuttons.lua b/modules/addonbuttons.lua index 07c3fec0..d06c9092 100644 --- a/modules/addonbuttons.lua +++ b/modules/addonbuttons.lua @@ -53,7 +53,6 @@ pfUI:RegisterModule("addonbuttons", "vanilla:tbc", function () pfUI.addonbuttons.overrides = {} pfUI.addonbuttons.last_updated = 0 pfUI.addonbuttons.rows = 1 - pfUI.addonbuttons.effective_scale = Minimap:GetEffectiveScale() pfUI.addonbuttons.max_button_size = 40 pfUI.addonbuttons:RegisterEvent("PLAYER_LOGIN") @@ -280,7 +279,7 @@ pfUI:RegisterModule("addonbuttons", "vanilla:tbc", function () if not frame then return end local top_frame, row_index, offsetX, offsetY, final_scale top_frame = GetTopFrame(frame) - final_scale = GetScale() / pfUI.addonbuttons.effective_scale + final_scale = GetScale() row_index = floor((index-1)/tonumber(C.abuttons.rowsize)) frame:SetFrameStrata("HIGH") frame:SetClampedToScreen(true)