IDEA-169924 fix typo and care of null color from scheme

This commit is contained in:
Sergey Malenkov
2017-04-06 13:54:52 +03:00
parent 87a989a2f3
commit c769f419b0

View File

@@ -110,16 +110,20 @@ public class BreadcrumbsXmlWrapper extends JComponent implements Disposable {
@Override
public Color getForeground() {
return isForegroundSet()
? super.getForeground()
: EditorColorsManager.getInstance().getGlobalScheme().getColor(EditorColors.LINE_NUMBERS_COLOR);
if (!isForegroundSet()) {
Color foreground = EditorColorsManager.getInstance().getGlobalScheme().getColor(EditorColors.LINE_NUMBERS_COLOR);
if (foreground != null) return foreground;
}
return super.getForeground();
}
@Override
public Color getBackground() {
return isForegroundSet()
? super.getForeground()
: EditorColorsManager.getInstance().getGlobalScheme().getColor(EditorColors.GUTTER_BACKGROUND);
if (!isBackgroundSet()) {
Color background = EditorColorsManager.getInstance().getGlobalScheme().getColor(EditorColors.GUTTER_BACKGROUND);
if (background != null) return background;
}
return super.getBackground();
}
@Override