From 35f3706e6daaf3d8dd6c05d2f7e133c502e46971 Mon Sep 17 00:00:00 2001 From: shagu Date: Sat, 16 Aug 2025 11:30:58 +0200 Subject: [PATCH] panel: resize button sizes to empty slots --- modules/panel.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/panel.lua b/modules/panel.lua index 0955282e..755cd079 100644 --- a/modules/panel.lua +++ b/modules/panel.lua @@ -754,7 +754,10 @@ pfUI:RegisterModule("panel", "vanilla:tbc", function() if not pfUI.chat then pfUI.panel.left.hide:Hide() end -- buttons for left panel - local width = pfUI.panel.left:GetWidth()/3-2 + local width = pfUI.panel.left:GetWidth() / 3 - 2 + width = C.panel.left.left == "none" and C.panel.left.right == "none" and pfUI.panel.left:GetWidth() - 2 or width + width = C.panel.left.center == "none" and pfUI.panel.left:GetWidth() / 2 - 2 or width + pfUI.panel.left.left = CreatePanelButton(pfUI.panel.left, width, "LEFT", "CENTER") pfUI.panel.left.center = CreatePanelButton(pfUI.panel.left, width, "CENTER", "CENTER") pfUI.panel.left.right = CreatePanelButton(pfUI.panel.left, width, "RIGHT", "CENTER") @@ -788,7 +791,10 @@ pfUI:RegisterModule("panel", "vanilla:tbc", function() if not pfUI.chat then pfUI.panel.right.hide:Hide() end -- buttons for right panel - local width = pfUI.panel.right:GetWidth()/3-2 + local width = pfUI.panel.right:GetWidth() / 3 - 2 + width = C.panel.right.left == "none" and C.panel.right.right == "none" and pfUI.panel.right:GetWidth() - 2 or width + width = C.panel.right.center == "none" and pfUI.panel.right:GetWidth() / 2 - 2 or width + pfUI.panel.right.left = CreatePanelButton(pfUI.panel.right, width, "LEFT", "CENTER") pfUI.panel.right.center = CreatePanelButton(pfUI.panel.right, width, "CENTER", "CENTER") pfUI.panel.right.right = CreatePanelButton(pfUI.panel.right, width, "RIGHT", "CENTER")