Skip to content

Commit

Permalink
Apply the size limit of Scrollable to its children (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
HoleFish authored Nov 16, 2024
1 parent 2fb375a commit 30ba6f4
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.gtnewhorizons.modularui.common.widget;

import java.awt.Dimension;
import java.util.ArrayList;
import java.util.List;

Expand Down Expand Up @@ -74,6 +75,12 @@ public void setVerticalScrollOffset(int offset) {
}
}

@Override
protected void modifyConstraints(Dimension constraints) {
constraints.setSize(getVisibleWidth(), getVisibleHeight());
super.modifyConstraints(constraints);
}

@Override
public int getVerticalScrollOffset() {
return this.yScroll;
Expand Down

0 comments on commit 30ba6f4

Please sign in to comment.