Skip to content

Commit

Permalink
fix calcs tab scroll bar (#8118)
Browse files Browse the repository at this point in the history
  • Loading branch information
Regisle authored Aug 14, 2024
1 parent a529b05 commit 61e76bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Classes/CalcsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ function CalcsTabClass:Draw(viewPort, inputEvents)

-- Arrange the sections
local baseX = viewPort.x + 4
local baseY = viewPort.y + 4
local baseY = viewPort.y + 30
local maxCol = m_floor(viewPort.width / (self.colWidth + 8))
if main.portraitMode then maxCol = 3 end
local colY = { }
Expand Down Expand Up @@ -300,14 +300,14 @@ function CalcsTabClass:Draw(viewPort, inputEvents)
end
end
self.controls.scrollBar.height = viewPort.height
self.controls.scrollBar:SetContentDimension(maxY - baseY, viewPort.height)
self.controls.scrollBar:SetContentDimension(maxY - (baseY - 26), viewPort.height)
for _, section in ipairs(self.sectionList) do
-- Give sections their actual Y position and let them update
section.y = section.y - self.controls.scrollBar.offset + 25
section.y = section.y - self.controls.scrollBar.offset
section:UpdatePos()
end

self.controls.search.y = 5 - self.controls.scrollBar.offset
self.controls.search.y = 4 - self.controls.scrollBar.offset

for _, event in ipairs(inputEvents) do
if event.type == "KeyDown" then
Expand Down

0 comments on commit 61e76bd

Please sign in to comment.