Skip to content

Commit

Permalink
BugFix: Suspended indicators not reactivated when active theme change…
Browse files Browse the repository at this point in the history
…s (github issue #215)
  • Loading branch information
michaelnpsp committed Mar 15, 2024
1 parent e9eddd0 commit fe0d2c4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions GridLayout.lua
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ end

function Grid2Layout:RefreshTheme()
self:UpdateFrame()
self:ResetHeadersFramesSize()
self:ReloadLayout(true)
end

Expand Down Expand Up @@ -748,6 +749,15 @@ function Grid2Layout:UpdateDisplay()
self:UpdateSize()
end

-- Needed when the active theme changes to force a frames Layout() to reactivate possible suspended indicators (github issue #215)
function Grid2Layout:ResetHeadersFramesSize()
for _, headers in pairs(self.groups) do
for _, header in ipairs(headers) do
header.frameWidth, header.frameHeight = nil, nil
end
end
end

function Grid2Layout:UpdateFramesSizeForHeader(header)
local w, h = self:GetFramesSizeForHeader(header)
if w~=header.frameWidth or h~=header.frameHeight or self.forceReload then -- forceReload => theme or profile changed, we need to Layout frames because icon/text sizes could change
Expand Down

0 comments on commit fe0d2c4

Please sign in to comment.