Add auto-resize for OPENMAIL button

This commit is contained in:
Артур
2017-12-14 15:29:03 +03:00
parent 7092d02867
commit 48f47fbc29
+5 -3
View File
@@ -185,11 +185,13 @@ do
end
function Inbox_Load()
local btn = CreateFrame('Button', nil, InboxFrame, 'UIPanelButtonTemplate')
local btn = CreateFrame('Button', 'OpenMailButton', InboxFrame, 'UIPanelButtonTemplate')
btn:SetPoint('BOTTOM', -10, 90)
btn:SetWidth(120)
btn:SetHeight(25)
btn:SetText(OPENMAIL)
local text_width = OpenMailButtonText:GetStringWidth()
if text_width < 60 then text_width = 60 end
btn:SetWidth(text_width+30)
btn:SetHeight(25)
btn:SetScript('OnClick', Inbox_OpenAll)
end