minor/temporary tweak for number of updates (fixes #201)

This commit is contained in:
Ben Fry
2021-06-14 16:24:49 -04:00
parent 53246fb23d
commit 0c47ba441a
3 changed files with 13 additions and 4 deletions
+6 -2
View File
@@ -289,12 +289,16 @@ public class EditorFooter extends Box {
FontRenderContext frc = g2.getFontRenderContext();
final int GAP = Toolkit.zoom(5);
final String updateLabel = "Updates";
String updatesStr = "" + updateCount;
//String updatesStr = " " + updateCount + " ";
String updatesStr = " " + ((int) (Math.random() * 25)) + " ";
double countWidth = font.getStringBounds(updatesStr, frc).getWidth();
double countHeight = font.getStringBounds(updatesStr, frc).getHeight();
if (fontAscent > countWidth) {
countWidth = fontAscent;
}
float diameter = (float) (countWidth * 1.65f);
// Using a variant of https://github.com/processing/processing/pull/4097
final float CIRCULAR_PADDING = 1.5f;
float diameter = (float) (2 * (Math.max(countHeight, countWidth)/2 + CIRCULAR_PADDING));
float ex = getWidth() - Editor.RIGHT_GUTTER - diameter;
float ey = (getHeight() - diameter) / 2;
g2.setColor(updateColor);
+4
View File
@@ -24,6 +24,10 @@ _ https://github.com/processing/processing4/issues/181
_ https://github.com/processing/processing4/pull/188
_ setting surface size needs to happen outside draw()
_ https://github.com/processing/processing4/issues/162
_ https://github.com/processing/processing4/issues/186
_ why does japplemenubar.JAppleMenuBar.hide(); still work?
_ it calls SetSystemUIMode, which is part of Carbon (which was removed in Catalina)
_ https://github.com/kritzikratzi/jAppleMenuBar/blob/master/src/native/jAppleMenuBar.m
+3 -2
View File
@@ -22,7 +22,6 @@ X https://github.com/processing/processing4/pull/198
X add PVector.setHeading() for parity with p5.js
X https://github.com/processing/processing4/issues/193
earlier
o further streamline the downloader
o https://github.com/processing/processing4/issues/47
@@ -35,7 +34,9 @@ X https://github.com/processing/processing4/pull/191
X fixing undo
X fix? https://github.com/processing/processing4/pull/175
_ https://github.com/processing/processing/issues/4775
X tweak the number of updates based on Akarshit's attempt
X https://github.com/processing/processing4/issues/201
X https://github.com/processing/processing/pull/4097
_ when lib downloads (batik) go dead, fallback to the download.processing.org version
_ or for now, tell users how to do it manually