diff --git a/app/src/processing/app/ui/EditorFooter.java b/app/src/processing/app/ui/EditorFooter.java index 589483c01..cf2ea561f 100644 --- a/app/src/processing/app/ui/EditorFooter.java +++ b/app/src/processing/app/ui/EditorFooter.java @@ -281,22 +281,24 @@ public class EditorFooter extends Box { private void drawUpdates(Graphics2D g2) { - FontRenderContext frc = g2.getFontRenderContext(); - final int GAP = 5; - final String updateLabel = "Updates"; - String updatesStr = "" + updateCount; - double countWidth = font.getStringBounds(updatesStr, frc).getWidth(); - float diameter = (float) (countWidth * 1.65f); - float ex = getWidth() - Editor.RIGHT_GUTTER - diameter; - float ey = (getHeight() - diameter) / 2; - g2.setColor(updateColor); - g2.fill(new Ellipse2D.Float(ex, ey, diameter, diameter)); - g2.setColor(textColor[SELECTED]); - int baseline = (getHeight() + fontAscent) / 2; - g2.drawString(updatesStr, (int) (ex + (diameter - countWidth)/2), baseline); - double updatesWidth = font.getStringBounds(updateLabel, frc).getWidth(); - g2.setColor(textColor[UNSELECTED]); - g2.drawString(updateLabel, (int) (ex - updatesWidth - GAP), baseline); + if (updateCount != 0) { + FontRenderContext frc = g2.getFontRenderContext(); + final int GAP = 5; + final String updateLabel = "Updates"; + String updatesStr = "" + updateCount; + double countWidth = font.getStringBounds(updatesStr, frc).getWidth(); + float diameter = (float) (countWidth * 1.65f); + float ex = getWidth() - Editor.RIGHT_GUTTER - diameter; + float ey = (getHeight() - diameter) / 2; + g2.setColor(updateColor); + g2.fill(new Ellipse2D.Float(ex, ey, diameter, diameter)); + g2.setColor(textColor[SELECTED]); + int baseline = (getHeight() + fontAscent) / 2; + g2.drawString(updatesStr, (int) (ex + (diameter - countWidth)/2), baseline); + double updatesWidth = font.getStringBounds(updateLabel, frc).getWidth(); + g2.setColor(textColor[UNSELECTED]); + g2.drawString(updateLabel, (int) (ex - updatesWidth - GAP), baseline); + } } diff --git a/todo.txt b/todo.txt index 1945b9752..9b2aceea2 100644 --- a/todo.txt +++ b/todo.txt @@ -16,6 +16,11 @@ X https://github.com/processing/processing/pull/3887 X grab bag of CM work from Jakub X https://github.com/processing/processing/issues/3895 X https://github.com/processing/processing/pull/3897 +X show number of updates available in the footer +X https://github.com/processing/processing/issues/3518 +X https://github.com/processing/processing/pull/3896 +X https://github.com/processing/processing/pull/3901 +o total number of updates available is not correct? (may be fixed) gui X distinguish errors and warnings @@ -93,12 +98,7 @@ _ bring back the # of updates on the update tab _ use this instead of the 'icon' stuff? _ or in addition, since only the 'updates' tab has it _ https://github.com/processing/processing/issues/3855 -_ show number of updates available in the footer -_ https://github.com/processing/processing/issues/3518 -X https://github.com/processing/processing/pull/3896 -X https://github.com/processing/processing/pull/3901 -_ and have it be clickable so to open the manager -_ total number of updates available is not correct? (may be fixed) +_ for updates available, have it be clickable to open the manager _ ugly white gap at the top of scroll bar _ the table header doesn't extend far enough _ scrolling "past" top/bottom causes the screen to jiggle (OS X and Trackpad)