Commit 44a7fdfa authored by Simpy's avatar Simpy 🐹
Browse files

another way to scale minimap mover

parent 72feb6eb
......@@ -249,16 +249,17 @@ function M:UpdateSettings()
local MinimapPanel, MMHolder = _G.MinimapPanel, _G.MMHolder
MinimapPanel:SetShown(E.db.datatexts.panels.MinimapPanel.enable)
local borderWidth, borderHeight = E.PixelMode and 2 or 6, E.PixelMode and 2 or 8
local panelSize, joinPanel = (MinimapPanel:IsShown() and MinimapPanel:GetHeight()) or (E.PixelMode and 1 or -1), 1
local height, width = E.MinimapSize + (panelSize - joinPanel), E.MinimapSize
MMHolder:Size(width + borderWidth, height + borderHeight)
local mmOffset = E.PixelMode and 1 or 3
Minimap:ClearAllPoints()
Minimap:Point('TOPRIGHT', MMHolder, 'TOPRIGHT', -mmOffset, -mmOffset)
Minimap:Size(E.MinimapSize, E.MinimapSize)
local mWidth, mHeight = Minimap:GetSize()
local bWidth, bHeight = E:Scale(E.PixelMode and 2 or 6), E:Scale(E.PixelMode and 2 or 8)
local panelSize, joinPanel = (MinimapPanel:IsShown() and MinimapPanel:GetHeight()) or E:Scale(E.PixelMode and 1 or -1), E:Scale(1)
local HEIGHT, WIDTH = mHeight + (panelSize - joinPanel), mWidth
MMHolder:SetSize(WIDTH + bWidth, HEIGHT + bHeight)
Minimap.location:Width(E.MinimapSize)
if E.db.general.minimap.locationText ~= 'SHOW' then
Minimap.location:Hide()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment