skin: auto adjust UIPanel sizes accordingly

This commit is contained in:
shagu
2019-03-31 14:59:21 +02:00
parent fc8c860678
commit c623b6bda3
3 changed files with 18 additions and 3 deletions
+18
View File
@@ -1,4 +1,22 @@
pfUI:RegisterModule("skin", function ()
-- align UIParent panels
pfUI.panelalign = CreateFrame("Frame", "pfUIParentPanelAlign", UIParent)
pfUI.panelalign:SetScript("OnUpdate", function()
local left = UIParent.left
local center = UIParent.center
-- reset anchors
if not left or not left:IsShown() or not center or not center:IsShown() then
UIParent.pfLeftAligned = nil
return
elseif center and center:IsShown() and left and left:IsShown() then
local width = left.backdrop and left.backdrop:GetRight() or left:GetRight()
if width ~= UIParent.pfLeftAligned then
center:SetPoint("TOPLEFT", "UIParent", "TOPLEFT", width + 10, -104)
UIParent.pfLeftAligned = width
end
end
end)
-- durability frame
pfUI.durability = CreateFrame("Frame","pfDurability",UIParent)
-1
View File
@@ -18,7 +18,6 @@ pfUI:RegisterSkin("Profession", function ()
HookAddonOrVariable(addon, function()
_G[displayed] = 23
_G.UIPanelWindows[frame] = {area = "doublewide", pushable = 0, whileDead = 1}
local SetSelection = frame.."_SetSelection"
local icon = _G[template.."Icon"]
-2
View File
@@ -1,6 +1,4 @@
pfUI:RegisterSkin("Quest Log", function ()
UIPanelWindows["QuestLogFrame"] = {area = "doublewide", pushable = 0, whileDead = 1}
local border = tonumber(pfUI_config.appearance.border.default)
local bpad = border > 1 and border - 1 or 1