mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
LabeledComponent's label width is calculated incorrectly if text contains 0x1B mnemonic instead of '&'
This commit is contained in:
@@ -181,7 +181,7 @@ public class LabeledComponent<Comp extends JComponent> extends JPanel implements
|
||||
}
|
||||
|
||||
public static TextWithMnemonic fromTextWithMnemonic(String textWithMnemonic) {
|
||||
int mnemonicIndex = textWithMnemonic.indexOf('&');
|
||||
int mnemonicIndex = UIUtil.getDisplayMnemonicIndex(textWithMnemonic);
|
||||
if (mnemonicIndex == -1) {
|
||||
return new TextWithMnemonic(textWithMnemonic, -1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user