From 0c47ba441a0f529fea821152598b3050447bba85 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Mon, 14 Jun 2021 16:24:49 -0400 Subject: [PATCH] minor/temporary tweak for number of updates (fixes #201) --- app/src/processing/app/ui/EditorFooter.java | 8 ++++++-- core/todo.txt | 4 ++++ todo.txt | 5 +++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app/src/processing/app/ui/EditorFooter.java b/app/src/processing/app/ui/EditorFooter.java index 81b16fc68..deb0da718 100644 --- a/app/src/processing/app/ui/EditorFooter.java +++ b/app/src/processing/app/ui/EditorFooter.java @@ -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); diff --git a/core/todo.txt b/core/todo.txt index f97a83775..0910a7648 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -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 diff --git a/todo.txt b/todo.txt index 66fd158d2..ea280cccb 100755 --- a/todo.txt +++ b/todo.txt @@ -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