aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java5
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/pages/ModConfigPage.java3
2 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java
index c76e029..0db6eac 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java
@@ -10,6 +10,8 @@ import cc.polyfrost.oneconfig.utils.ColorUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
+import java.awt.*;
+
public class BasicButton extends BasicElement {
protected String text;
@@ -44,7 +46,8 @@ public class BasicButton extends BasicElement {
fontSize = 24f;
this.colorPalette = -1;
} else {
- fontSize = 14f;
+ if (colorPalette == 0) fontSize = 12;
+ else fontSize = 14f;
this.colorPalette = colorPalette;
}
}
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModConfigPage.java b/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModConfigPage.java
index b529778..fa40b12 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModConfigPage.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModConfigPage.java
@@ -125,8 +125,7 @@ public class ModConfigPage extends Page {
if(categories.size() <= 1) return 0;
int buttonX = x + 16;
for (BasicButton button : categories) {
- if (button.getWidth() == 0)
- button.setWidth((int) (Math.ceil(RenderManager.getTextWidth(vg, button.getText(), 14f, Fonts.MEDIUM) / 8f) * 8 + 16));
+ if (button.getWidth() == 0) button.setWidth((int) (Math.ceil(RenderManager.getTextWidth(vg, button.getText(), 12f, Fonts.MEDIUM) / 8f) * 8 + 16));
button.draw(vg, buttonX, y + 16);
buttonX += button.getWidth() + 16;
}