Skip to content

Commit

Permalink
Merge pull request #120 from FTBTeam/bugfix/1.21/scroll-bar-size
Browse files Browse the repository at this point in the history
[1.21.1] Fix scrollbar width changing
  • Loading branch information
MichaelHillcox authored Aug 21, 2024
2 parents dcdd84a + fe533a3 commit f6db43f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void tick() {
super.tick();

int prevWidth = mainPanel.width;
int newWidth = (!showScrollBar && scrollBar.shouldDraw() ? getGui().width - getScrollbarWidth() - 2 : getGui().width) - mainPanelInset().getFirst() * 2;
int newWidth = (showScrollBar && scrollBar.shouldDraw() ? getGui().width - getScrollbarWidth() - 2 : getGui().width) - mainPanelInset().getFirst() * 2;
if (prevWidth != newWidth) {
mainPanel.setWidth(newWidth);
mainPanel.alignWidgets();
Expand Down

0 comments on commit f6db43f

Please sign in to comment.