From 2b077835a114a78fd9710e122fc61b4742886e14 Mon Sep 17 00:00:00 2001 From: Benjamin_6848 <83084481+Benjamin-6848@users.noreply.github.com> Date: Mon, 31 Jan 2022 20:51:40 +0100 Subject: [PATCH] Fixed Color-Issues and Screen-Update-Order I fixed 2 Problems: 1. When trying to clear the old Text, so it could get updated, previously it got cleared by using "g.theme.fg" as color which is white. But it should be "g.theme.bg" which is black. 2. Previously the Date got "deleted" by the falling Shards, this problem should be fixed. --- apps/matrixclock/matrixclock.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/matrixclock/matrixclock.js b/apps/matrixclock/matrixclock.js index ab18c13b8..e116280af 100644 --- a/apps/matrixclock/matrixclock.js +++ b/apps/matrixclock/matrixclock.js @@ -147,7 +147,7 @@ function draw_clock(){ g.setFont("Vector", g.getWidth() / 5); g.setFontAlign(0,-1); if(last_draw_time == null || now.getMinutes() != last_draw_time.getMinutes()){ - g.setColor(g.theme.fg); + g.setColor(g.theme.bg); g.drawString(timeStr, w/2, TIME_Y_COORD); timeStr = format_time(now); } @@ -158,12 +158,12 @@ function draw_clock(){ g.setFont("Vector",15); g.setFontAlign(0,-1,0); if(last_draw_time == null || now.getDate() != last_draw_time.getDate()){ - g.setColor(g.theme.fg); + g.setColor(g.theme.bg); g.drawString(dateStr, w/2, DATE_Y_COORD); dateStr = format_date(now); - g.setColor(SHARD_COLOR[0], SHARD_COLOR[1], SHARD_COLOR[2]); - g.drawString(dateStr, w/2, DATE_Y_COORD); } + g.setColor(SHARD_COLOR[0], SHARD_COLOR[1], SHARD_COLOR[2]); + g.drawString(dateStr, w/2, DATE_Y_COORD); last_draw_time = now; }