CombineAddonButtons - frame height

Frame Height is now based on number of buttons.
This commit is contained in:
Sattva
2023-06-05 05:07:59 +03:00
parent b12649d88e
commit d86a0f51ed
+6 -1
View File
@@ -4244,11 +4244,16 @@ function LeaPlusLC:FriendCheck(name)
end
end
end
print("Number of buttons in first column: " .. (numButtons % maxButtonsPerColumn))
-- Resize the minimapFrame based on the number of columns and buttons.
local frameHeight = buttonWidth * maxButtonsPerColumn + buttonSpacing * (maxButtonsPerColumn - 1)
minimapFrame:SetWidth(numColumns * (buttonWidth + buttonSpacing))
minimapFrame:SetHeight(frameHeight)
if numButtons <= maxButtonsPerColumn then
minimapFrame:SetHeight(buttonWidth * numButtons + buttonSpacing * (numButtons - 1))
else
minimapFrame:SetHeight(frameHeight)
end
-- print("Number of buttons: " .. numButtons)
end