mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
better color for the errors tab notification (still incomplete)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user