Quantcast

Minimap buttons can be resized when anchored to minimap too

Repooc [02-23-13 - 11:18]
Minimap buttons can be resized when anchored to minimap too
Filename
ElvUI_SLE/modules/minimap/minimapicons.lua
ElvUI_SLE/modules/minimap/options.lua
diff --git a/ElvUI_SLE/modules/minimap/minimapicons.lua b/ElvUI_SLE/modules/minimap/minimapicons.lua
index 82c59e7..113c0a3 100644
--- a/ElvUI_SLE/modules/minimap/minimapicons.lua
+++ b/ElvUI_SLE/modules/minimap/minimapicons.lua
@@ -139,7 +139,7 @@ function SMB:UpdateLayout()
 			end

 			frame:ClearAllPoints()
-			frame:SetSize(24, 24)
+			frame:Size(E.db.sle.minimap.buttons.size)
 			frame:SetPoint(frame.original.Point, frame.original.relativeTo, frame.original.relativePoint, frame.original.xOfs, frame.original.yOfs)
 			frame:SetFrameStrata(frame.original.FrameStrata)
 			frame:SetMovable(true)
diff --git a/ElvUI_SLE/modules/minimap/options.lua b/ElvUI_SLE/modules/minimap/options.lua
index 17e6fed..aae0af8 100644
--- a/ElvUI_SLE/modules/minimap/options.lua
+++ b/ElvUI_SLE/modules/minimap/options.lua
@@ -60,8 +60,18 @@ local function configTable()
 						get = function(info) return E.private.sle.minimap.buttons.enable end,
 						set = function(info, value) E.private.sle.minimap.buttons.enable = value; E:StaticPopup_Show("PRIVATE_RL") end,
 					},
-					anchor = {
+					size = {
 						order = 2,
+						type = 'range',
+						name = L['Button Size'],
+						desc = L['The size of the minimap buttons when not anchored to the minimap.'],
+						min = 16, max = 40, step = 1,
+						get = function(info) return E.db.sle.minimap.buttons.size end,
+						set = function(info, value) E.db.sle.minimap.buttons.size = value; E:GetModule('SquareMinimapButtons'):UpdateLayout() end,
+						disabled = function() return not E.private.sle.minimap.buttons.enable end,
+					},
+					anchor = {
+						order = 3,
 						type = 'select',
 						name = L['Anchor Setting'],
 						desc = L['Anchor mode for displaying the minimap buttons are skinned.'],
@@ -74,16 +84,6 @@ local function configTable()
 						},
 						disabled = function() return not E.private.sle.minimap.buttons.enable end,
 					},
-					size = {
-						order = 3,
-						type = 'range',
-						name = L['Button Size'],
-						desc = L['The size of the minimap buttons when not anchored to the minimap.'],
-						min = 16, max = 40, step = 1,
-						get = function(info) return E.db.sle.minimap.buttons.size end,
-						set = function(info, value) E.db.sle.minimap.buttons.size = value; E:GetModule('SquareMinimapButtons'):UpdateLayout() end,
-						disabled = function() return not E.private.sle.minimap.buttons.enable or E.db.sle.minimap.buttons.anchor == 'NOANCHOR' end,
-					},
 					mouseover = {
 						order = 4,
 						name = L['Mouse Over'],