mirror of
https://github.com/xiaozhou233/OrangeX-Client.git
synced 2026-12-05 13:05:52 +08:00
Fix: Use fixed 300px max visible content height for panel scrolling
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user