fixing up colors per design spec

This commit is contained in:
Ben Fry
2015-08-21 12:25:51 -04:00
parent facadfc9f5
commit 53405ecf4b
6 changed files with 63 additions and 88 deletions

View File

@@ -140,10 +140,9 @@ public class ErrorColumn extends JPanel {
this.preferredHeight = height;
this.errorCheckerService = editor.errorCheckerService;
errorColor = mode.getColor("errorbar.errorcolor"); //, errorColor);
warningColor = mode.getColor("errorbar.warningcolor"); //, warningColor);
//backgroundColor = mode.getColor("errorbar.backgroundcolor"); //, backgroundColor);
backgroundColor = mode.getColor("gutter.bgcolor");
errorColor = mode.getColor("editor.column.error.color");
warningColor = mode.getColor("editor.column.warning.color");
backgroundColor = mode.getColor("editor.gutter.bgcolor");
addListeners();
}

View File

@@ -66,13 +66,10 @@ import processing.app.ui.Editor;
public class JavaTextAreaPainter extends TextAreaPainter
implements MouseListener, MouseMotionListener {
// protected JavaTextArea ta; // we need the subclassed textarea
// protected ErrorCheckerService errorCheckerService;
public Color errorColor; // = new Color(0xED2630);
public Color warningColor; // = new Color(0xFFC30E);
public Color errorMarkerColor; // = new Color(0xED2630);
public Color warningMarkerColor; // = new Color(0xFFC30E);
public Color errorUnderlineColor;
public Color warningUnderlineColor;
// public Color errorMarkerColor;
// public Color warningMarkerColor;
protected Font gutterTextFont;
protected Color gutterTextColor;
@@ -216,14 +213,6 @@ public class JavaTextAreaPainter extends TextAreaPainter
}
// private void loadTheme(ExperimentalMode mode) {
// errorColor = mode.getThemeColor("editor.errorcolor", errorColor);
// warningColor = mode.getThemeColor("editor.warningcolor", warningColor);
// errorMarkerColor = mode.getThemeColor("editor.errormarkercolor", errorMarkerColor);
// warningMarkerColor = mode.getThemeColor("editor.warningmarkercolor", warningMarkerColor);
// }
/**
* Paint a line. Paints the gutter (with background color and text) then the
* line (background color and text).
@@ -428,9 +417,9 @@ public class JavaTextAreaPainter extends TextAreaPainter
// }
// gfx.fillRect(1, y + 2, 3, height - 2);
gfx.setColor(errorColor);
gfx.setColor(errorUnderlineColor);
if (isWarning) {
gfx.setColor(warningColor);
gfx.setColor(warningUnderlineColor);
}
int xx = x1;
@@ -479,13 +468,10 @@ public class JavaTextAreaPainter extends TextAreaPainter
* @param mode
*/
public void setMode(JavaMode mode) {
//this.errorCheckerService = ecs;
//loadTheme(mode);
errorColor = mode.getColor("editor.errorcolor"); //, errorColor);
warningColor = mode.getColor("editor.warningcolor"); //, warningColor);
errorMarkerColor = mode.getColor("editor.errormarkercolor"); //, errorMarkerColor);
warningMarkerColor = mode.getColor("editor.warningmarkercolor"); //, warningMarkerColor);
errorUnderlineColor = mode.getColor("editor.error.underline.color");
warningUnderlineColor = mode.getColor("editor.warning.underline.color");
// errorMarkerColor = mode.getColor("editor.errormarkercolor");
// warningMarkerColor = mode.getColor("editor.warningmarkercolor");
gutterTextFont = mode.getFont("editor.gutter.text.font");
gutterTextColor = mode.getColor("editor.gutter.text.color");