mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-11 16:10:01 +00:00
skin: auto adjust UIPanel sizes accordingly
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user