Skip to content

Commit 119d92c

Browse files
committed
fix overlapping rendering of compared Config option controls
1 parent 03f013c commit 119d92c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Classes/CompareTab.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ local LAYOUT = {
8181
-- Config view (shared between Draw() layout and DrawConfig())
8282
configRowHeight = 22,
8383
configColumnHeaderHeight = 20,
84-
configFixedHeaderHeight = 92,
84+
configFixedHeaderHeight = 82,
8585
configSectionWidth = 560,
8686
configSectionGap = 24,
8787
configSectionColumnGap = 10,
@@ -1992,6 +1992,8 @@ function CompareTabClass:LayoutConfigView(contentVP, compareEntry)
19921992

19931993
-- Third pass: position controls at absolute coords
19941994
local scrollTopAbs = contentVP.y + fixedHeaderHeight
1995+
local scrollBottomAbs = contentVP.y + contentVP.height
1996+
local ctrlH = rowHeight
19951997
for _, sec in ipairs(sectionLayout) do
19961998
local sectionAbsX = contentVP.x + sec.x
19971999
local rowY = sec.y + sectionInnerPad
@@ -2004,7 +2006,7 @@ function CompareTabClass:LayoutConfigView(contentVP, compareEntry)
20042006
local capturedRowY = rowY
20052007
local shownFn = function()
20062008
local ay = contentVP.y + fixedHeaderHeight + capturedRowY - self.scrollY
2007-
return ay >= scrollTopAbs - 20 and ay < contentVP.y + contentVP.height
2009+
return ay >= scrollTopAbs and ay + ctrlH <= scrollBottomAbs
20082010
and self.compareViewMode == "CONFIG" and self:GetActiveCompare() ~= nil
20092011
end
20102012
ci.primaryControl.shown = shownFn

0 commit comments

Comments
 (0)