mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Nimbus-compatible getting of list selection background and foreground [r=max]
This commit is contained in:
@@ -185,7 +185,11 @@ public class UIUtil {
|
||||
}
|
||||
|
||||
public static Color getListSelectionForeground() {
|
||||
return UIManager.getColor("List.selectionForeground");
|
||||
final Color color = UIManager.getColor("List.selectionForeground");
|
||||
if (color == null) {
|
||||
return UIManager.getColor("List[Selected].textForeground"); // Nimbus
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
public static Color getFieldForegroundColor() {
|
||||
@@ -317,7 +321,11 @@ public class UIUtil {
|
||||
}
|
||||
|
||||
public static Color getListSelectionBackground() {
|
||||
return UIManager.getColor("List.selectionBackground");
|
||||
final Color color = UIManager.getColor("List.selectionBackground");
|
||||
if (color == null) {
|
||||
return UIManager.getColor("List[Selected].textBackground"); // Nimbus
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
public static Color getTextFieldForeground() {
|
||||
|
||||
Reference in New Issue
Block a user