From 8dd16a9379f0541bd37e19b092262aad0611a1fe Mon Sep 17 00:00:00 2001 From: michaelsp Date: Fri, 9 Feb 2024 23:41:33 +0100 Subject: [PATCH] Now the main window border decoration is hidden if no frames are visible (CF issue #1282). --- GridLayout.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GridLayout.lua b/GridLayout.lua index 20a937f5..8e2f89db 100644 --- a/GridLayout.lua +++ b/GridLayout.lua @@ -794,9 +794,11 @@ function Grid2Layout:UpdateSize() curCol = curCol + col remSize = (g.dbx.type=='custom' or (g[1] and g[1]:IsVisible())) and 0 or remSize + col end - local col = math.max( curCol - remSize + p.Spacing*2 - p.Padding, 1 ) + curCol = curCol - remSize + local col = math.max( curCol + p.Spacing*2 - p.Padding, 1 ) local row = math.max( maxRow + p.Spacing*2, 1 ) if p.horizontal then col,row = row,col end + self.frame.frameBack:SetShown(curCol>1 and maxRow>1) self.frame.frameBack:SetSize(col,row) if not Grid2:RunSecure(7, self, "UpdateSize") then self.frame:SetSize(col,row)