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.
This commit is contained in:
shagu
2023-01-09 19:14:49 +01:00
parent 027730b53b
commit 19354bdf5b
+1 -2
View File
@@ -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)