From 9662f0e452a0e1ac23de3f39861d15db7db5b1cc Mon Sep 17 00:00:00 2001 From: shedaniel Date: Thu, 7 May 2020 09:18:13 +0800 Subject: Bump for 20w19a Signed-off-by: shedaniel --- src/main/java/me/shedaniel/rei/impl/widgets/LabelWidget.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/me/shedaniel/rei/impl/widgets/LabelWidget.java') diff --git a/src/main/java/me/shedaniel/rei/impl/widgets/LabelWidget.java b/src/main/java/me/shedaniel/rei/impl/widgets/LabelWidget.java index b333adc55..d3de15a04 100644 --- a/src/main/java/me/shedaniel/rei/impl/widgets/LabelWidget.java +++ b/src/main/java/me/shedaniel/rei/impl/widgets/LabelWidget.java @@ -183,7 +183,7 @@ public final class LabelWidget extends Label { @NotNull @Override public final Rectangle getBounds() { - int width = font.getWidth(text); + int width = font.getStringWidth(text); Point point = getPoint(); if (getHorizontalAlignment() == LEFT_ALIGNED) return new Rectangle(point.x - 1, point.y - 5, width + 2, 14); @@ -200,7 +200,7 @@ public final class LabelWidget extends Label { if (isClickable() && isHovered(mouseX, mouseY)) color = getHoveredColor(); Point pos = getPoint(); - int width = font.getWidth(getText()); + int width = font.getStringWidth(getText()); switch (getHorizontalAlignment()) { case LEFT_ALIGNED: if (hasShadow()) -- cgit