Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Calcs tab scroll bar #8118

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading