Permalink
Browse files

Merge pull request #69 from mkaring/1.4

ListBox bugfix
  • Loading branch information...
2 parents b9d244f + 71473a8 commit aee63cc91f8f631682e541e74ecc4b32d777857f @void256 void256 committed Dec 8, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 nifty-controls/src/main/java/de/lessvoid/nifty/controls/ListBox.java
View
3 nifty-controls/src/main/java/de/lessvoid/nifty/controls/ListBox.java
@@ -285,7 +285,8 @@ public int getWidth(final Element element, final T item) {
+ "ListBoxViewConverter to the ListBox.");
return 0;
}
- return element.getRenderer(TextRenderer.class).getFont().getWidth(item.toString());
+ final String resultText = element.getNifty().specialValuesReplace(item.toString());
+ return element.getRenderer(TextRenderer.class).getFont().getWidth(resultText);
}
}
}

0 comments on commit aee63cc

Please sign in to comment.