limelight sorted icon and png

pull/1247/head
hughbarney 2022-01-07 00:38:15 +00:00
parent bce36e9afc
commit a31b22d3fb
4 changed files with 31 additions and 19 deletions

View File

@ -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);

View File

@ -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"));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 929 B

After

Width:  |  Height:  |  Size: 318 B

View File

@ -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();
}
},