mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
Fix padding between filters
This commit is contained in:
@@ -30,13 +30,13 @@ public abstract class ToggleButtonsFilter<T extends InventoryItem> extends ItemF
|
||||
|
||||
@Override
|
||||
public float getPreferredWidth(float maxWidth, float height) {
|
||||
return Math.min(height * buttons.size(), maxWidth);
|
||||
return Math.min((height - FLabel.BORDER_THICKNESS) * buttons.size() + FLabel.BORDER_THICKNESS, maxWidth);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doWidgetLayout(float width, float height) {
|
||||
float buttonWidth = (width + FLabel.BORDER_THICKNESS * (buttons.size() - 1)) / buttons.size();
|
||||
float buttonHeight = height;
|
||||
float buttonWidth = Math.min(buttonHeight, width / buttons.size());
|
||||
|
||||
float x = 0;
|
||||
for (FLabel btn : buttons) {
|
||||
|
||||
Reference in New Issue
Block a user