diff --git a/source/net/filebot/ui/SelectButtonTextField.java b/source/net/filebot/ui/SelectButtonTextField.java index 42ab7105..c78ec570 100644 --- a/source/net/filebot/ui/SelectButtonTextField.java +++ b/source/net/filebot/ui/SelectButtonTextField.java @@ -97,9 +97,7 @@ public class SelectButtonTextField extends JComponent { @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); - setBorder(new EmptyBorder(1, 4, 1, 4)); - String highlightText = SelectButtonTextField.this.getText().substring(0, ((TextFieldComboBoxUI) editor.getUI()).getEditor().getSelectionStart()); // highlight the matching sequence @@ -107,7 +105,6 @@ public class SelectButtonTextField extends JComponent { // use no-break, because we really don't want line-wrapping in our table cells StringBuffer htmlText = new StringBuffer(""); - if (matcher.find()) { if (isSelected) { matcher.appendReplacement(htmlText, "$0"); @@ -115,13 +112,10 @@ public class SelectButtonTextField extends JComponent { matcher.appendReplacement(htmlText, "$0"); } } - matcher.appendTail(htmlText); - htmlText.append(""); setText(htmlText.toString()); - return this; } } diff --git a/source/net/filebot/util/ui/SwingUI.java b/source/net/filebot/util/ui/SwingUI.java index 37951e52..49874fd3 100644 --- a/source/net/filebot/util/ui/SwingUI.java +++ b/source/net/filebot/util/ui/SwingUI.java @@ -73,7 +73,7 @@ public final class SwingUI { } public static String toHex(Color c) { - return String.format("#%02x%02x%02x", c.getRed(), c.getGreen(), c.getBlue()); + return c == null ? "inherit" : String.format("#%02x%02x%02x", c.getRed(), c.getGreen(), c.getBlue()); } public static boolean isShiftOrAltDown(ActionEvent evt) {