From 561b4dae82d5c33eab1f7d3f83b71034cfb60429 Mon Sep 17 00:00:00 2001 From: fr_shine Date: Wed, 23 Aug 2017 19:57:06 +0800 Subject: [PATCH] NumberDragBar labelString --- designer_base/src/com/fr/design/gui/style/NumberDragBar.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/gui/style/NumberDragBar.java b/designer_base/src/com/fr/design/gui/style/NumberDragBar.java index 013f76e92..0fa223a79 100644 --- a/designer_base/src/com/fr/design/gui/style/NumberDragBar.java +++ b/designer_base/src/com/fr/design/gui/style/NumberDragBar.java @@ -74,7 +74,7 @@ public class NumberDragBar extends JComponent { g2.setColor(isEnabled() ? UIConstants.FONT_COLOR : UIManager.getColor("Label.disabledForeground")); g2.drawString(String.valueOf(minValue), 2, 10); - g2.drawString(String.valueOf(maxValue), width - 20, 10); + g2.drawString(String.valueOf(maxValue), width - 10 * String.valueOf(maxValue).length(), 10); if(minValue < 0) { g2.drawString("0", width / 2 - 2, 10); }