better color for the errors tab notification (still incomplete)

This commit is contained in:
Ben Fry
2015-05-19 15:20:52 -04:00
parent df0a714e5f
commit 3a5d01b284
3 changed files with 11 additions and 3 deletions
+9 -2
View File
@@ -58,6 +58,7 @@ public class EditorFooter extends Box {
Color[] textColor = new Color[2];
Color[] tabColor = new Color[2];
Color errorColor;
Editor editor;
@@ -139,6 +140,8 @@ public class EditorFooter extends Box {
tabColor[SELECTED] = mode.getColor("footer.tab.selected.color");
tabColor[UNSELECTED] = mode.getColor("footer.tab.unselected.color");
errorColor = mode.getColor("status.error.bgcolor");
gradient = mode.makeGradient("footer", 400, HIGH);
}
@@ -241,12 +244,16 @@ public class EditorFooter extends Box {
if (g != null) {
g.setColor(tabColor[state]);
if (tab.notification) {
g.setColor(new Color(192, 0, 0));
g.setColor(errorColor);
}
drawTab(g, tab.left, tab.right, tab.isFirst(), tab.isLast());
int textLeft = tab.left + ((tab.right - tab.left) - tab.textWidth) / 2;
g.setColor(textColor[state]);
if (tab.notification && state == UNSELECTED) {
g.setColor(Color.LIGHT_GRAY);
} else {
g.setColor(textColor[state]);
}
int tabHeight = TAB_BOTTOM - TAB_TOP;
int baseline = TAB_TOP + (tabHeight + fontAscent) / 2;
g.drawString(tab.name, textLeft, baseline);
+1 -1
View File
@@ -351,7 +351,7 @@ public class EditorHeader extends JComponent {
if (code.isModified()) {
g.setColor(modifiedColor);
//g.drawLine(tab.left + NOTCH, top, tab.right - NOTCH, top);
g.drawLine(tab.left + (i == 0 ? CURVE_RADIUS : 0), TAB_TOP, tab.right, TAB_TOP);
g.drawLine(tab.left + (i == 0 ? CURVE_RADIUS : 0), TAB_TOP, tab.right-1, TAB_TOP);
}
}
+1
View File
@@ -20,6 +20,7 @@ X https://github.com/processing/processing/issues/2982
X Quitting P3D sketch throws an error
X https://github.com/processing/processing/issues/3293
high priority
_ displayWidth and displayHeight are zero
_ https://github.com/processing/processing/issues/3295