From 70d5bf40de7166ab4bb2f63eb7671ccca48eab8f Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Wed, 6 Jul 2022 09:42:31 +0100 Subject: [PATCH] teatimer Fix issue setting colors after showMessage (fix #2025) --- apps/teatimer/ChangeLog | 2 ++ apps/teatimer/app.js | 8 ++++---- apps/teatimer/metadata.json | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 apps/teatimer/ChangeLog diff --git a/apps/teatimer/ChangeLog b/apps/teatimer/ChangeLog new file mode 100644 index 000000000..91eb720eb --- /dev/null +++ b/apps/teatimer/ChangeLog @@ -0,0 +1,2 @@ +0.01: New App! +0.02: Fix issue setting colors after showMessage diff --git a/apps/teatimer/app.js b/apps/teatimer/app.js index dd7afdadb..80a731317 100644 --- a/apps/teatimer/app.js +++ b/apps/teatimer/app.js @@ -67,9 +67,9 @@ function startTimer() { - hint for help in state start */ function showCounter(withHint) { - //g.clear(); + g.reset(); // workaround for E.showMessage bg color in 2v14 and earlier E.showMessage("", appTitle()); - g.setFontAlign(0,0); // center font + g.reset().setFontAlign(0,0); // center font // draw the current counter value g.setBgColor(-1).setColor(0,0,1); // blue g.setFont("Vector",20); // vector font, 20px @@ -123,9 +123,9 @@ function countUp() { outOfTime(); return; } - g.clear(); + g.reset(); // workaround for E.showMessage bg color in 2v14 and earlier E.showMessage("", appTitle()); - g.setFontAlign(0,0); // center font + g.reset().setFontAlign(0,0); // center font g.setBgColor(-1).setColor(0,0,1); // blue g.setFont("Vector",20); // vector font, 20px g.drawString("Timer: " + timeFormated(counterStart),80,55); diff --git a/apps/teatimer/metadata.json b/apps/teatimer/metadata.json index acace0402..f53ed374f 100644 --- a/apps/teatimer/metadata.json +++ b/apps/teatimer/metadata.json @@ -1,7 +1,7 @@ { "id": "teatimer", "name": "Tea Timer", - "version": "0.01", + "version": "0.02", "description": "A simple timer. You can easyly set up the time.", "icon": "teatimer.png", "type": "app",