Fix so combo boxes aren't cut off

This commit is contained in:
drdev
2014-04-11 03:27:59 +00:00
parent 4ecd5c8e42
commit 9687e3e661

View File

@@ -185,9 +185,10 @@ public class FComboBox<E> extends FTextField {
float x = FComboBox.this.localToScreenX(0); float x = FComboBox.this.localToScreenX(0);
float y = FComboBox.this.localToScreenY(FComboBox.this.getHeight()); float y = FComboBox.this.localToScreenY(FComboBox.this.getHeight());
paneSize = updateAndGetPaneSize(FComboBox.this.getWidth(), screenHeight - y); float maxVisibleHeight = screenHeight - y;
paneSize = updateAndGetPaneSize(FComboBox.this.getWidth(), maxVisibleHeight);
setBounds(Math.round(x), Math.round(y), Math.round(FComboBox.this.getWidth()), Math.round(paneSize.getHeight())); setBounds(Math.round(x), Math.round(y), Math.round(FComboBox.this.getWidth()), Math.min(Math.round(paneSize.getHeight()), maxVisibleHeight));
} }
@Override @Override