Fix: Use fixed 300px max visible content height for panel scrolling

This commit is contained in:
xiaozhou233 committed 2026-08-22 16:05:40 +08:00
1 parent 73f46720a2
commit a9930b3d23
1 file changed
+2 -4
@@ -41,7 +41,7 @@ public class Panel {
private double scrollOffset;
private double targetScrollOffset;
private static final int BOTTOM_PADDING = 20;
private static final int MAX_VISIBLE_CONTENT_HEIGHT = 300;
public Panel(ModuleCategory category, int x, int y, int width, int height) {
@@ -192,9 +192,7 @@ public class Panel {
private int getMaxVisibleContentHeight() {
ScaledResolution sr = new ScaledResolution(Minecraft.getMinecraft());
int screenHeight = sr.getScaledHeight();
return Math.max(0, screenHeight - y - headerHeight - BOTTOM_PADDING);
return MAX_VISIBLE_CONTENT_HEIGHT;
}