pebblepp 0.11: Make the border on clockinfos the default
Fix clockinfos when too long (previously just output '...')master
parent
b784275589
commit
1b50cdf31d
|
|
@ -1,6 +1,6 @@
|
||||||
0.01: First release
|
0.01: First release
|
||||||
0.02: clock_info now uses app name to maintain settings specifically for this clock face
|
0.02: clock_info now uses app name to maintain settings specifically for this clock face
|
||||||
ensure clockinfo text is usppercase (font doesn't render lowercase)
|
ensure clockinfo text is uppercase (font doesn't render lowercase)
|
||||||
0.03: Use smaller font if clock_info test doesn't fit in area
|
0.03: Use smaller font if clock_info test doesn't fit in area
|
||||||
0.04: Ensure we only scale down clockinfo text if it really won't fit
|
0.04: Ensure we only scale down clockinfo text if it really won't fit
|
||||||
0.05: Minor code improvements
|
0.05: Minor code improvements
|
||||||
|
|
@ -10,4 +10,6 @@
|
||||||
0.09: Add date on the bottom
|
0.09: Add date on the bottom
|
||||||
0.10: Fix size of bottom bar after 0.09
|
0.10: Fix size of bottom bar after 0.09
|
||||||
Make date toggleable with settings
|
Make date toggleable with settings
|
||||||
Optional border around clockinfos (available from settings)
|
Optional border around clockinfos (available from settings)
|
||||||
|
0.11: Make the border on clockinfos the default
|
||||||
|
Fix clockinfos when too long (previously just output '...')
|
||||||
|
|
@ -20,7 +20,7 @@ Graphics.prototype.setFontLECO1976Regular14 = function() {
|
||||||
|
|
||||||
{
|
{
|
||||||
const SETTINGS_FILE = "pebblepp.json";
|
const SETTINGS_FILE = "pebblepp.json";
|
||||||
let settings = Object.assign({'theme':'System', 'showdate':true, 'clkinfoborder': false}, require("Storage").readJSON(SETTINGS_FILE,1)||{});
|
let settings = Object.assign({'theme':'System', 'showdate':true, 'clkinfoborder': true}, require("Storage").readJSON(SETTINGS_FILE,1)||{});
|
||||||
let background = require("clockbg");
|
let background = require("clockbg");
|
||||||
let theme;
|
let theme;
|
||||||
let drawTimeout;
|
let drawTimeout;
|
||||||
|
|
@ -102,7 +102,7 @@ let clockInfoDraw = (itm, info, options) => {
|
||||||
g.setFontLECO1976Regular14();
|
g.setFontLECO1976Regular14();
|
||||||
if (g.stringWidth(txt) > options.w) {// if still too big, split to 2 lines
|
if (g.stringWidth(txt) > options.w) {// if still too big, split to 2 lines
|
||||||
var l = g.wrapString(txt, options.w);
|
var l = g.wrapString(txt, options.w);
|
||||||
txt = l.slice(0,2).join("\n") + (l.length>2)?"...":"";
|
txt = l.slice(0,2).join("\n") + ((l.length>2)?"...":"");
|
||||||
}
|
}
|
||||||
y = options.y+options.h-12;
|
y = options.y+options.h-12;
|
||||||
if (settings.clkinfoborder) {
|
if (settings.clkinfoborder) {
|
||||||
|
|
@ -147,4 +147,4 @@ background.fillRect(Bangle.appRect); // start off with completely clear backgrou
|
||||||
g.setColor(theme.fg).fillRect(0, h2 - 6, w, h3 + 6);
|
g.setColor(theme.fg).fillRect(0, h2 - 6, w, h3 + 6);
|
||||||
|
|
||||||
draw();
|
draw();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"id": "pebblepp",
|
"id": "pebblepp",
|
||||||
"name": "Pebble++ Clock",
|
"name": "Pebble++ Clock",
|
||||||
"shortName": "Pebble++",
|
"shortName": "Pebble++",
|
||||||
"version": "0.10",
|
"version": "0.11",
|
||||||
"description": "A Pebble style clock (based on the 'Pebble Clock' app) but with two configurable ClockInfo items at the top and custom backgrounds. Date/theme/borders be reconfigured using settings page.",
|
"description": "A Pebble style clock (based on the 'Pebble Clock' app) but with two configurable ClockInfo items at the top and custom backgrounds. Date/theme/borders be reconfigured using settings page.",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"screenshots": [{"url":"screenshot.png"},{"url":"screenshot2.png"}],
|
"screenshots": [{"url":"screenshot.png"},{"url":"screenshot2.png"}],
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
const SETTINGS_FILE = "pebblepp.json";
|
const SETTINGS_FILE = "pebblepp.json";
|
||||||
|
|
||||||
// Initialize with default settings...
|
// Initialize with default settings...
|
||||||
let settings = {'theme':'System', 'showdate':true, 'clkinfoborder':false}
|
let settings = {'theme':'System', 'showdate':true, 'clkinfoborder':true}
|
||||||
// ...and overwrite them with any saved values
|
// ...and overwrite them with any saved values
|
||||||
// This way saved values are preserved if a new version adds more settings
|
// This way saved values are preserved if a new version adds more settings
|
||||||
const storage = require('Storage');
|
const storage = require('Storage');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue