1
0
Fork 0

Merge pull request #1 from leer10/style-cleanup

style cleanup
master
leer10 2021-11-28 14:58:18 -08:00 committed by GitHub
commit 918dcba633
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 65 additions and 61 deletions

View File

@ -4462,7 +4462,7 @@
"shortName":"93 Dub", "shortName":"93 Dub",
"icon": "93dub.png", "icon": "93dub.png",
"screenshots": [{"url":"screenshot.png"}], "screenshots": [{"url":"screenshot.png"}],
"version":"0.02", "version":"0.03",
"description": "Fan recreation of orviwan's 91 Dub app for the Pebble smartwatch. Uses assets from his 91-Dub-v2.0 repo", "description": "Fan recreation of orviwan's 91 Dub app for the Pebble smartwatch. Uses assets from his 91-Dub-v2.0 repo",
"tags": "clock", "tags": "clock",
"type": "clock", "type": "clock",

View File

@ -1,2 +1,3 @@
0.01 Initial version for upload 0.01 Initial version for upload
0.02 DiscoMinotaur's adjustments (removed battery and adjusted spacing) 0.02 DiscoMinotaur's adjustments (removed battery and adjusted spacing)
0.03 Code style cleanup

View File

@ -48,7 +48,6 @@ function queueDraw() {
} }
function drawBackground() { function drawBackground() {
// set background
g.setBgColor(0,0,0); g.setBgColor(0,0,0);
g.setColor(1,1,1); g.setColor(1,1,1);
g.clear(); g.clear();
@ -69,13 +68,16 @@ g.setColor(1,1,1);
if (is24hr){ if (is24hr){
g.drawImage(img24hr,32, 65); g.drawImage(img24hr,32, 65);
if (leadingZero){ if (leadingZero){
h = ("0"+h).substr(-2);}} h = ("0"+h).substr(-2);
else if (h > 12) {g.drawImage(imgPM,40, 70); }
} else if (h > 12) {
g.drawImage(imgPM,40, 70);
h = h - 12; h = h - 12;
if (leadingZero){ if (leadingZero){
h = ("0"+h).substr(-2);} h = ("0"+h).substr(-2);
else } else {
{h = " " + h;} h = " " + h;
}
} }
//draw separator //draw separator
@ -102,8 +104,9 @@ g.setFontCustom(fontNum, 48, 28, 41);
if (h<10) { if (h<10) {
if (leadingZero) { if (leadingZero) {
h = ("0"+h).substr(-2); h = ("0"+h).substr(-2);
} else {
h = " " + h;
} }
else {h = " " + h;}
} }
g.drawString(h, 25, 90, true); g.drawString(h, 25, 90, true);
g.drawString(("0"+m).substr(-2), 92, 90, true); g.drawString(("0"+m).substr(-2), 92, 90, true);