forked from FOSS/BangleApps
Merge branch 'ffcniftya-clock-0.02'
commit
8086bf4b0a
|
@ -3,19 +3,16 @@
|
||||||
Colors are black/white - photos have non correct camera color "blue"
|
Colors are black/white - photos have non correct camera color "blue"
|
||||||
|
|
||||||
## This is the clock
|
## This is the clock
|
||||||

|
 (*emulated*)
|
||||||
*emulated*
|
|
||||||
|
|
||||||

|
|
||||||
*photo*
|
 (*photo*)
|
||||||
|
|
||||||
## The week number can be turned of in settings
|
## The week number can be turned of in settings
|
||||||
(default is **"On"**)
|
(default is **"On"**)
|
||||||
|
|
||||||

|
 (*emulated*)
|
||||||
*emulated*
|
|
||||||
|
|
||||||

|
 (*photo*)
|
||||||
*photo*
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const locale = require("locale");
|
const locale = require("locale");
|
||||||
const is12Hour = (require("Storage").readJSON("setting.json", 1) || {})["12hour"];
|
const is12Hour = (require("Storage").readJSON("setting.json", 1) || {})["12hour"];
|
||||||
const CFG = require('Storage').readJSON("ffcniftya.json", 1) || {showWeek: true};
|
const CFG = require('Storage').readJSON("ffcniftya.json", 1) || {showWeekNum: true};
|
||||||
|
|
||||||
/* Clock *********************************************/
|
/* Clock *********************************************/
|
||||||
const scale = g.getWidth() / 176;
|
const scale = g.getWidth() / 176;
|
||||||
|
@ -59,7 +59,7 @@ function draw() {
|
||||||
g.drawString(year, centerDatesScaleX, center.y - 62 * scale);
|
g.drawString(year, centerDatesScaleX, center.y - 62 * scale);
|
||||||
g.drawString(month, centerDatesScaleX, center.y - 44 * scale);
|
g.drawString(month, centerDatesScaleX, center.y - 44 * scale);
|
||||||
g.drawString(day, centerDatesScaleX, center.y - 26 * scale);
|
g.drawString(day, centerDatesScaleX, center.y - 26 * scale);
|
||||||
if (CFG.showWeek) g.drawString(d02(ISO8601_week_no(now)), centerDatesScaleX, center.y + 15 * scale);
|
if (CFG.showWeekNum) g.drawString(d02(ISO8601_week_no(now)), centerDatesScaleX, center.y + 15 * scale);
|
||||||
g.drawString(monthName, centerDatesScaleX, center.y + 48 * scale);
|
g.drawString(monthName, centerDatesScaleX, center.y + 48 * scale);
|
||||||
g.drawString(dayName, centerDatesScaleX, center.y + 66 * scale);
|
g.drawString(dayName, centerDatesScaleX, center.y + 66 * scale);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue