fix: UI simetry optimized

This commit is contained in:
Vati
2026-03-18 01:33:57 +04:00
parent e2a37ff6cf
commit cfa49f4a35
4 changed files with 175 additions and 26 deletions
+13 -7
View File
@@ -425,21 +425,27 @@ function Guda_ResizeFrame(frameName, containerName, currentRow, currentCol, colu
local totalRows = (currentRow or 0) + 1
if totalRows < 1 then totalRows = 1 end
local containerWidth = (columns * (buttonSize + spacing)) + 20
local containerHeight = overrideHeight or ((totalRows * (buttonSize + spacing)) + 20)
local frameWidth = containerWidth + 20
-- Get theme-aware padding
local pad = { containerExtra = 20, frameExtra = 20, titleHeight = 40, searchBarHeight = 30, footerHeight = 45, footerHiddenHeight = 10 }
if addon.Modules and addon.Modules.Theme and addon.Modules.Theme.GetFramePadding then
pad = addon.Modules.Theme:GetFramePadding()
end
local containerWidth = columns * (buttonSize + spacing) - spacing + 2 * pad.startX
local containerHeight = overrideHeight or (totalRows * (buttonSize + spacing) - spacing + 2 * math.abs(pad.startY))
local frameWidth = containerWidth + pad.frameExtra
local showSearchBar = addon.Modules.DB:GetSetting("showSearchBar")
if showSearchBar == nil then showSearchBar = true end
local titleHeight = 40
local searchBarHeight = 30
local footerHeight = 45
local titleHeight = pad.titleHeight
local searchBarHeight = pad.searchBarHeight
local footerHeight = pad.footerHeight
local frameHeight
local hideFooter = addon.Modules.DB:GetSetting("hideFooter")
if hideFooter then
footerHeight = 10
footerHeight = pad.footerHiddenHeight
frameHeight = containerHeight + titleHeight + (showSearchBar and searchBarHeight or 0) + footerHeight
elseif showSearchBar then
frameHeight = containerHeight + titleHeight + searchBarHeight + footerHeight