git://git.nikiroo.be
/
nikiroo-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vertical bar cursor option
[nikiroo-utils.git]
/
src
/
jexer
/
TButton.java
diff --git
a/src/jexer/TButton.java
b/src/jexer/TButton.java
index 33fe73328b1773f9b42225537a70771fc8c8b6d6..82a638922df56ed7ad6086fcfd5ba4aff385e28f 100644
(file)
--- a/
src/jexer/TButton.java
+++ b/
src/jexer/TButton.java
@@
-32,6
+32,7
@@
import jexer.bits.CellAttributes;
import jexer.bits.Color;
import jexer.bits.GraphicsChars;
import jexer.bits.MnemonicString;
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;
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);
setX(x);
setY(y);
setHeight(2);
- setWidth(
mnemonic.getRawLabel().length(
) + 3);
+ setWidth(
StringUtils.width(mnemonic.getRawLabel()
) + 3);
shadowColor = new CellAttributes();
shadowColor.setTo(getWindow().getBackground());
shadowColor = new CellAttributes();
shadowColor.setTo(getWindow().getBackground());
@@
-249,12
+250,12
@@
public class TButton extends TWidget {
GraphicsChars.CP437[0xDF], shadowColor);
}
}
GraphicsChars.CP437[0xDF], shadowColor);
}
}
- if (mnemonic.getShortcutIdx() >= 0) {
+ if (mnemonic.getS
creenS
hortcutIdx() >= 0) {
if (inButtonPress) {
if (inButtonPress) {
- putCharXY(2 + mnemonic.getShortcutIdx(), 0,
+ putCharXY(2 + mnemonic.getS
creenS
hortcutIdx(), 0,
mnemonic.getShortcut(), menuMnemonicColor);
} else {
mnemonic.getShortcut(), menuMnemonicColor);
} else {
- putCharXY(1 + mnemonic.getShortcutIdx(), 0,
+ putCharXY(1 + mnemonic.getS
creenS
hortcutIdx(), 0,
mnemonic.getShortcut(), menuMnemonicColor);
}
}
mnemonic.getShortcut(), menuMnemonicColor);
}
}