diff --git a/apps/circlesclock/README.md b/apps/circlesclock/README.md index 628979555..242adcf4b 100644 --- a/apps/circlesclock/README.md +++ b/apps/circlesclock/README.md @@ -1,6 +1,6 @@ # Circles clock -A clock with circles for different data at the bottom in a probably familiar style +A clock with three or four circles for different data at the bottom in a probably familiar style By default the time, date and day of week is shown. @@ -18,6 +18,8 @@ It can show the following information (this can be configured): ## Screenshots ![Screenshot dark theme](screenshot-dark.png) ![Screenshot light theme](screenshot-light.png) +![Screenshot dark theme with four circles](screenshot-dark-4.png) +![Screenshot light theme with four circles](screenshot-light-4.png) ## Creator Marco ([myxor](https://github.com/myxor)) diff --git a/apps/circlesclock/app.js b/apps/circlesclock/app.js index 1d2e14912..221fc637b 100644 --- a/apps/circlesclock/app.js +++ b/apps/circlesclock/app.js @@ -45,9 +45,6 @@ let settings = storage.readJSON("circlesclock.json", 1) || { settings.stepGoal = d != undefined && d.settings != undefined ? d.settings.goal : 10000; } - -const circleCount = settings.circleCount || 3; - /* * Read location from myLocation app */ @@ -57,6 +54,7 @@ function getLocation() { let location = getLocation(); const showWidgets = settings.showWidgets || false; +const circleCount = settings.circleCount || 3; let hrtValue; let now = Math.round(new Date().getTime() / 1000); @@ -92,16 +90,16 @@ const h3 = Math.round(8 * h / 8 - hOffset - 3); // circle y position */ const parts = circleCount * 2; const circlePosX = [ - Math.round(1 * w / parts), - Math.round(3 * w / parts), - Math.round(5 * w / parts), - Math.round(7 * w / parts), + Math.round(1 * w / parts), // circle1 + Math.round(3 * w / parts), // circle2 + Math.round(5 * w / parts), // circle3 + Math.round(7 * w / parts), // circle4 ]; const radiusOuter = circleCount == 3 ? 25 : 20; const radiusInner = circleCount == 3 ? 20 : 15; -const circleFont = circleCount == 3 ? "Vector:15" : "Vector:13"; -const circleFontBig = circleCount == 3 ? "Vector:16" : "Vector:14"; +const circleFont = circleCount == 3 ? "Vector:15" : "Vector:12"; +const circleFontBig = circleCount == 3 ? "Vector:16" : "Vector:13"; const defaultCircleTypes = ["steps", "hr", "battery", "weather"]; @@ -190,7 +188,7 @@ function getCirclePosition(type) { if (circlePositionsCache[type] >= 0) { return circlePosX[circlePositionsCache[type]]; } - for (let i = 1; i <= 3; i++) { + for (let i = 1; i <= circleCount; i++) { const setting = settings['circle' + i]; if (setting == type) { circlePositionsCache[type] = i - 1; diff --git a/apps/circlesclock/screenshot-dark-4.png b/apps/circlesclock/screenshot-dark-4.png new file mode 100644 index 000000000..4f1a1b457 Binary files /dev/null and b/apps/circlesclock/screenshot-dark-4.png differ diff --git a/apps/circlesclock/screenshot-dark.png b/apps/circlesclock/screenshot-dark.png index 00c0e3399..4bf8cae9f 100644 Binary files a/apps/circlesclock/screenshot-dark.png and b/apps/circlesclock/screenshot-dark.png differ diff --git a/apps/circlesclock/screenshot-light-4.png b/apps/circlesclock/screenshot-light-4.png new file mode 100644 index 000000000..74d9e2740 Binary files /dev/null and b/apps/circlesclock/screenshot-light-4.png differ diff --git a/apps/circlesclock/screenshot-light.png b/apps/circlesclock/screenshot-light.png index af47b30a4..1a746d5bf 100644 Binary files a/apps/circlesclock/screenshot-light.png and b/apps/circlesclock/screenshot-light.png differ