Merge pull request #1504 from copoer/copoer/fix/local-contour-clock
[Contour Clock] Fix Localemaster
commit
6c4d38d6c6
|
|
@ -5,3 +5,4 @@
|
|||
0.23: Customizer! Unused fonts no longer take up precious memory.
|
||||
0.24: Added previews to the customizer.
|
||||
0.25: Fixed a bug that would let widgets change the color of the clock.
|
||||
0.26: Time formatted to locale
|
||||
|
|
|
|||
|
|
@ -1,3 +1,11 @@
|
|||
var is12;
|
||||
function getHours(d) {
|
||||
var h = d.getHours();
|
||||
if (is12===undefined) is12 = (require('Storage').readJSON('setting.json',1)||{})["12hour"];
|
||||
if (!is12) return h;
|
||||
return (h%12==0) ? 12 : h%12;
|
||||
}
|
||||
|
||||
exports.drawClock = function(fontIndex) {
|
||||
var digits = [];
|
||||
fontFile=require("Storage").read("contourclock-"+Math.abs(parseInt(fontIndex+0.5))+".json");
|
||||
|
|
@ -15,8 +23,8 @@ exports.drawClock = function(fontIndex) {
|
|||
var y = g.getHeight()/2-digits[0].height/2;
|
||||
var date = new Date();
|
||||
g.clearRect(0,38,g.getWidth()-1,138);
|
||||
d1=parseInt(date.getHours()/10);
|
||||
d2=parseInt(date.getHours()%10);
|
||||
d1=parseInt(getHours(date)/10);
|
||||
d2=parseInt(getHours(date)%10);
|
||||
d3=10;
|
||||
d4=parseInt(date.getMinutes()/10);
|
||||
d5=parseInt(date.getMinutes()%10);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ "id": "contourclock",
|
||||
"name": "Contour Clock",
|
||||
"shortName" : "Contour Clock",
|
||||
"version":"0.25",
|
||||
"version":"0.26",
|
||||
"icon": "app.png",
|
||||
"description": "A Minimalist clockface with large Digits. Now with more fonts!",
|
||||
"screenshots" : [{"url":"cc-screenshot-1.png"},{"url":"cc-screenshot-2.png"}],
|
||||
|
|
|
|||
Loading…
Reference in New Issue