mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-26 09:48:56 -05:00
* update search-auto-completion
This commit is contained in:
parent
0da24469b7
commit
53ad37930d
@ -108,7 +108,11 @@ public class SelectButtonTextField<T> extends JComponent {
|
|||||||
StringBuffer htmlText = new StringBuffer("<html><nobr>");
|
StringBuffer htmlText = new StringBuffer("<html><nobr>");
|
||||||
|
|
||||||
if (matcher.find()) {
|
if (matcher.find()) {
|
||||||
matcher.appendReplacement(htmlText, "<span style='font-weight: bold; text-decoration: underline;'>$0</span>");
|
if (isSelected) {
|
||||||
|
matcher.appendReplacement(htmlText, "<span style='font-weight: bold;'>$0</span>");
|
||||||
|
} else {
|
||||||
|
matcher.appendReplacement(htmlText, "<span style='color: " + TunedUtilities.toHex(list.getSelectionBackground()) + "; font-weight: bold;'>$0</span>");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
matcher.appendTail(htmlText);
|
matcher.appendTail(htmlText);
|
||||||
|
@ -90,7 +90,10 @@ public class EpisodeListPanel extends AbstractSearchPanel<EpisodeListProvider, E
|
|||||||
names.add(Normalization.removeTrailingBrackets(n));
|
names.add(Normalization.removeTrailingBrackets(n));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new TreeSet<String>(names);
|
|
||||||
|
TreeSet<String> treeSet = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
|
||||||
|
treeSet.addAll(names);
|
||||||
|
return treeSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -152,7 +152,10 @@ public class SubtitlePanel extends AbstractSearchPanel<SubtitleProvider, Subtitl
|
|||||||
names.add(Normalization.removeTrailingBrackets(n));
|
names.add(Normalization.removeTrailingBrackets(n));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new TreeSet<String>(names);
|
|
||||||
|
TreeSet<String> treeSet = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
|
||||||
|
treeSet.addAll(names);
|
||||||
|
return treeSet;
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -71,6 +71,10 @@ public final class TunedUtilities {
|
|||||||
return new Color(((int) ((alpha * 255)) << 24) | (color.getRGB() & 0x00FFFFFF), true);
|
return new Color(((int) ((alpha * 255)) << 24) | (color.getRGB() & 0x00FFFFFF), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String toHex(Color c) {
|
||||||
|
return String.format("#%02x%02x%02x", c.getRed(), c.getGreen(), c.getBlue());
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean isShiftOrAltDown(ActionEvent evt) {
|
public static boolean isShiftOrAltDown(ActionEvent evt) {
|
||||||
return checkModifiers(evt.getModifiers(), ActionEvent.SHIFT_MASK) || checkModifiers(evt.getModifiers(), ActionEvent.ALT_MASK);
|
return checkModifiers(evt.getModifiers(), ActionEvent.SHIFT_MASK) || checkModifiers(evt.getModifiers(), ActionEvent.ALT_MASK);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user