api: move height into skin function

This commit is contained in:
shagu
2018-07-01 17:41:06 +02:00
parent 4673b2668e
commit 593323219a
2 changed files with 4 additions and 2 deletions
+4 -1
View File
@@ -500,13 +500,16 @@ function pfUI.api.SkinDropDown(frame, offsetX, offsetY)
end end
function pfUI.api.SkinTab(frame, fixed) function pfUI.api.SkinTab(frame, fixed)
frame:SetHeight(20)
StripTextures(frame) StripTextures(frame)
CreateBackdrop(frame) CreateBackdrop(frame)
if not fixed then if not fixed then
frame:SetScript("OnShow", function() frame:SetScript("OnShow", function()
this:SetWidth(this:GetTextWidth() + 20) this:SetWidth(this:GetTextWidth() + 20)
_G[this:GetName().."Text"]:SetPoint("CENTER", 0, 0) if this.GetFontString and this:GetFontString() then
this:GetFontString():SetPoint("CENTER", 0, 0)
end
end) end)
end end
end end
-1
View File
@@ -370,7 +370,6 @@ pfUI:RegisterSkin("Character", function ()
local tab = _G["CharacterFrameTab"..i] local tab = _G["CharacterFrameTab"..i]
SkinTab(tab) SkinTab(tab)
tab.backdrop:SetFrameLevel(1) tab.backdrop:SetFrameLevel(1)
tab:SetHeight(18)
if i ~= 1 then if i ~= 1 then
local lastTab = _G["CharacterFrameTab"..(i-1)] local lastTab = _G["CharacterFrameTab"..(i-1)]