#35 CJK WIP
[fanfix.git] / src / jexer / TButton.java
index 33fe73328b1773f9b42225537a70771fc8c8b6d6..534c12a441b9db40ce07f760e947b7c5e6cf796c 100644 (file)
@@ -32,6 +32,7 @@ import jexer.bits.CellAttributes;
 import jexer.bits.Color;
 import jexer.bits.GraphicsChars;
 import jexer.bits.MnemonicString;
+import jexer.bits.StringUtils;
 import jexer.event.TKeypressEvent;
 import jexer.event.TMouseEvent;
 import static jexer.TKeypress.kbEnter;
@@ -98,7 +99,7 @@ public class TButton extends TWidget {
         setX(x);
         setY(y);
         setHeight(2);
-        setWidth(mnemonic.getRawLabel().length() + 3);
+        setWidth(StringUtils.width(mnemonic.getRawLabel()) + 3);
 
         shadowColor = new CellAttributes();
         shadowColor.setTo(getWindow().getBackground());