diff --git a/apps/iconlaunch/ChangeLog b/apps/iconlaunch/ChangeLog index cd36a4468..76ad52e88 100644 --- a/apps/iconlaunch/ChangeLog +++ b/apps/iconlaunch/ChangeLog @@ -25,4 +25,5 @@ 0.18: Better performance 0.19: Remove 'jit' keyword as 'for(..of..)' is not supported (fix #2937) 0.20: Use '28' font if installed (2v26+) and put it inside a rounded rect in the current theme - Ensure 'oneClickExit' is the default \ No newline at end of file + Ensure 'oneClickExit' is the default +0.21: Display placeholder icons at start and render line by line to the screen to make loading seem faster \ No newline at end of file diff --git a/apps/iconlaunch/app.js b/apps/iconlaunch/app.js index 885bacbcb..f6546c016 100644 --- a/apps/iconlaunch/app.js +++ b/apps/iconlaunch/app.js @@ -16,6 +16,22 @@ } else { // for fast-load, if we had widgets then we should hide them require("widget_utils").hide(); } + + let selectedItem = -1; + const R = Bangle.appRect; + const iconSize = 48; + const appsN = Math.floor(R.w / iconSize); + const whitespace = Math.floor((R.w - appsN * iconSize) / (appsN + 1)); + const iconYoffset = Math.floor(whitespace/4)-1; + const itemSize = iconSize + whitespace; + + // show some grey blocks as a loading screen + g.clearRect(Bangle.appRect).setColor("#888"); + for (var y=R.y+whitespace/2;y