From 783ea2245500e8abfb3bde062b5bc8c1fe4cf47c Mon Sep 17 00:00:00 2001 From: Philip Andresen Date: Tue, 13 Jun 2023 17:08:12 -0400 Subject: [PATCH] kbmatry1.07 Fix glitchy widget showthrough --- apps/kbmatry/ChangeLog | 3 ++- apps/kbmatry/lib.js | 6 +++++- apps/kbmatry/metadata.json | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/kbmatry/ChangeLog b/apps/kbmatry/ChangeLog index 98d0187ab..76a6ce39d 100644 --- a/apps/kbmatry/ChangeLog +++ b/apps/kbmatry/ChangeLog @@ -4,4 +4,5 @@ 1.03: Attempt to improve keyboard load time. 1.04: Make code asynchronous and improve load time. 1.05: Fix layout issue and rename library -1.06: Touch up readme, prep for IPO, add screenshots \ No newline at end of file +1.06: Touch up readme, prep for IPO, add screenshots +1.07: Fix widget display \ No newline at end of file diff --git a/apps/kbmatry/lib.js b/apps/kbmatry/lib.js index a7a434dad..ad65073a5 100644 --- a/apps/kbmatry/lib.js +++ b/apps/kbmatry/lib.js @@ -1,3 +1,5 @@ +const widgetUtils = require("widget_utils"); + /** * Attempt to lay out a set of characters in a logical way to optimize the number of buttons with the number * of characters per button. Useful if you need to dynamically (or frequently) change your character set @@ -230,6 +232,7 @@ const defaultCharSetShift = [ * @returns {Promise} */ function input(options) { + widgetUtils.hide(); options = options || {}; let typed = options.text || ""; let resolveFunction = () => {}; @@ -487,7 +490,8 @@ function input(options) { Bangle.setLocked(false); }) }).then((result) => { - g.clearRect(Bangle.appRect); + g.clear(true); + widgetUtils.show(); clearInterval(blinkInterval); Bangle.setUI(); return result; diff --git a/apps/kbmatry/metadata.json b/apps/kbmatry/metadata.json index 793286180..c166c1f12 100644 --- a/apps/kbmatry/metadata.json +++ b/apps/kbmatry/metadata.json @@ -1,6 +1,6 @@ { "id": "kbmatry", "name": "Matryoshka Keyboard", - "version":"1.06", + "version":"1.07", "description": "A library for text input via onscreen keyboard. Easily enter characters with nested keyboards.", "icon": "icon.png", "type":"textinput",