pebblepp 0.11: Make the border on clockinfos the default

Fix clockinfos when too long (previously just output '...')
master
Gordon Williams 2025-06-16 16:56:53 +01:00
parent b784275589
commit 1b50cdf31d
4 changed files with 9 additions and 7 deletions

View File

@ -1,6 +1,6 @@
0.01: First release
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.04: Ensure we only scale down clockinfo text if it really won't fit
0.05: Minor code improvements
@ -11,3 +11,5 @@
0.10: Fix size of bottom bar after 0.09
Make date toggleable with 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 '...')

View File

@ -20,7 +20,7 @@ Graphics.prototype.setFontLECO1976Regular14 = function() {
{
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 theme;
let drawTimeout;
@ -102,7 +102,7 @@ let clockInfoDraw = (itm, info, options) => {
g.setFontLECO1976Regular14();
if (g.stringWidth(txt) > options.w) {// if still too big, split to 2 lines
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;
if (settings.clkinfoborder) {

View File

@ -2,7 +2,7 @@
"id": "pebblepp",
"name": "Pebble++ Clock",
"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.",
"icon": "app.png",
"screenshots": [{"url":"screenshot.png"},{"url":"screenshot2.png"}],

View File

@ -2,7 +2,7 @@
const SETTINGS_FILE = "pebblepp.json";
// 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
// This way saved values are preserved if a new version adds more settings
const storage = require('Storage');