Merge pull request #39 from Lichery/master

Add auto-resize for OPENMAIL button
This commit is contained in:
shirsig
2017-12-14 22:15:46 +01:00
committed by GitHub
+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