diff --git a/apps/limelight/limelight.app.js b/apps/limelight/limelight.app.js index af4a99a38..f41b050d1 100644 --- a/apps/limelight/limelight.app.js +++ b/apps/limelight/limelight.app.js @@ -41,6 +41,16 @@ function loadSettings() { var UPDATE_PERIOD; var drawTimeout; + +/* + * This calculation assumes that there will never be widgets on the + * bottom but it could just as easily be adjusted. If only 1 widget + * is loaded at the top Bangle.appRect changes to report as if + * widgets were loaded at the bottom as well. The other option would + * be for Bangle.appRect to adjust for different combinations EG: no + * widgets, wigets on top, widgets on bottom and widgets on top and + * bottom areas. + */ const CenterX = g.getWidth()/2; const CenterY = (g.getHeight()/2) + (Bangle.appRect.y/2); const outerRadius = (g.getHeight() - Bangle.appRect.y)/2; @@ -96,22 +106,6 @@ function transformPolygon (originalPolygon, OriginX,OriginY, Phi) { } } -function setNumbersFont() { - if (settings.vector) { - g.setFont('Vector', settings.vector_size); - return; - } - - if (settings.font == "GochiHand") - g.setFontGochiHand(); - else if (settings.font == "Grenadier") - g.setFontCabinSketch(); - else if (settings.font == "Monoton") - g.setFontMonoton(); - else - g.setFontLimelight(); -} - function drawNumbers() { g.setColor(g.theme.fg); setNumbersFont(); @@ -157,6 +151,22 @@ function drawHands () { } } +function setNumbersFont() { + if (settings.vector) { + g.setFont('Vector', settings.vector_size); + return; + } + + if (settings.font == "GochiHand") + g.setFontGochiHand(); + else if (settings.font == "Grenadier") + g.setFontGrenadierNF(); + else if (settings.font == "Monoton") + g.setFontMonoton(); + else + g.setFontLimelight(); +} + function draw() { g.setColor(g.theme.bg); g.fillRect(Bangle.appRect); diff --git a/apps/limelight/limelight.icon.js b/apps/limelight/limelight.icon.js index 06f93e2ef..9e886bbf8 100644 --- a/apps/limelight/limelight.icon.js +++ b/apps/limelight/limelight.icon.js @@ -1 +1 @@ -require("heatshrink").decompress(atob("mEwwIdah/wAof//4ECgYFB4AFBg4FB8AFBj/wh/4AoM/wEB/gFBvwCEBAU/AQP4gfAj8AgPwAoMPwED8AFBg/AAYIBDA4ngg4TB4EBApkPKgJSBJQIFTMgIFCJIIFDKoIFEvgFBGoMAnw7DP4IFEh+BAoItBg+DNIQwBMIaeCKoKxCPoIzCEgKVHUIqtFXIrFFaIrdFdIwAV")) +require("heatshrink").decompress(atob("lksgIqngf/wAFC//+AgUch/4AgMBwAQEh/8Dgf/4AKOEAQKCAYUB//gAoU/DQkPBQYVBGx5SDBQIbDBR0GEAlgFYcHGwh4B+CDHRwL04")); diff --git a/apps/limelight/limelight.png b/apps/limelight/limelight.png index cf057046b..b1744b28e 100644 Binary files a/apps/limelight/limelight.png and b/apps/limelight/limelight.png differ diff --git a/apps/limelight/limelight.settings.js b/apps/limelight/limelight.settings.js index 90e2f897a..16ed8e27e 100644 --- a/apps/limelight/limelight.settings.js +++ b/apps/limelight/limelight.settings.js @@ -14,6 +14,8 @@ const storage = require('Storage') let settings = storage.readJSON(SETTINGS_FILE, 1) || {} const saved = settings || {} + + // copy settings into variable for (const key in saved) { s[key] = saved[key] } @@ -46,12 +48,12 @@ }, }, 'Vector Size': { - value: settings.vector_size, + value: s.vector_size, min: 24, max: 56, step: 6, onchange: v => { - settings.vector_size = v; + s.vector_size = v; save(); } },