From b21f495cbfb258bae4618bb73069b824c97c05a1 Mon Sep 17 00:00:00 2001 From: Erik Andresen Date: Tue, 13 Feb 2024 07:56:51 +0100 Subject: [PATCH] widadjust: reverse hide check --- apps/widadjust/widget.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/apps/widadjust/widget.js b/apps/widadjust/widget.js index 38cf0e283..bc418862d 100644 --- a/apps/widadjust/widget.js +++ b/apps/widadjust/widget.js @@ -85,15 +85,16 @@ } function draw() { - if (settings.hide !== true) { - g.reset().setFont('6x8').setFontAlign(0, 0); - g.clearRect(this.x, this.y, this.x + WIDTH - 1, this.y + 23); - g.drawString(Math.round(clockError), this.x + WIDTH/2, this.y + 9); + if (settings.hide === true) { + return; + } + g.reset().setFont('6x8').setFontAlign(0, 0); + g.clearRect(this.x, this.y, this.x + WIDTH - 1, this.y + 23); + g.drawString(Math.round(clockError), this.x + WIDTH/2, this.y + 9); - if (lastPpm !== null) { - g.setFont('4x6').setFontAlign(0, 1); - g.drawString(lastPpm.toFixed(1), this.x + WIDTH/2, this.y + 23); - } + if (lastPpm !== null) { + g.setFont('4x6').setFontAlign(0, 1); + g.drawString(lastPpm.toFixed(1), this.x + WIDTH/2, this.y + 23); } }