From bfa9a757ddd417554b599f8b8ce92e88a7089471 Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Wed, 31 Jul 2024 17:52:56 +0100 Subject: [PATCH 1/3] slopeclockpp: avoid reusing background colour for clkinfo --- apps/slopeclockpp/app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/slopeclockpp/app.js b/apps/slopeclockpp/app.js index 5b1d898d1..359993bc3 100644 --- a/apps/slopeclockpp/app.js +++ b/apps/slopeclockpp/app.js @@ -128,9 +128,9 @@ let clockInfoDraw = (itm, info, options) => { let texty = options.y+41; // set a cliprect to stop us drawing outside our box g.reset().setClipRect(options.x, options.y, options.x+options.w-1, options.y+options.h-1); - g.setFont("6x15").setBgColor(options.bg).setColor(options.fg).clearRect(options.x, texty-15, options.x+options.w-2, texty); + g.setFont("6x15").setBgColor(options.bg).clearRect(options.x, texty-15, options.x+options.w-2, texty); - if (options.focus) g.setColor(options.hl); + g.setColor(options.focus ? options.hl : options.fg); if (options.x < g.getWidth()/2) { // left align let x = options.x+2; if (info.img) g.clearRect(x, options.y, x+23, options.y+23).drawImage(info.img, x, options.y); @@ -150,7 +150,7 @@ let clockInfoMenu = require("clock_info").addInteractive(clockInfoItems, { // t }); let clockInfoMenu2 = require("clock_info").addInteractive(clockInfoItems, { // bottom left app:"slopeclockpp",x:0, y:115, w:50, h:40, - draw : clockInfoDraw, bg : bgColor, fg : g.theme.bg, hl : (bgColor=="#000")?"#f00"/*red*/:g.theme.fg + draw : clockInfoDraw, bg : bgColor, fg : g.theme.bg, hl : (g.theme.fg===g.toColor(bgColor))?"#f00"/*red*/:g.theme.fg }); // Show launcher when middle button pressed @@ -175,4 +175,4 @@ Bangle.loadWidgets(); if (settings.hideWidgets) require("widget_utils").swipeOn(); else setTimeout(Bangle.drawWidgets,0); draw(); -} \ No newline at end of file +} From 08e9d3439274bb7eb113ed9b205465caf55a9ea9 Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Wed, 31 Jul 2024 17:54:12 +0100 Subject: [PATCH 2/3] slopeclockpp: fix lint --- apps/slopeclockpp/app.js | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/slopeclockpp/app.js b/apps/slopeclockpp/app.js index 359993bc3..df732c1db 100644 --- a/apps/slopeclockpp/app.js +++ b/apps/slopeclockpp/app.js @@ -86,6 +86,7 @@ let draw = function() { let isAnimIn = true; let animInterval; +let minuteX; // Draw *just* the minute image let drawMinute = function() { var yo = slopeBorder + offsy + y - 2*slope*minuteX/R.w; From a6e0991065e500efca80666be61699bee405c9b6 Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Wed, 31 Jul 2024 17:54:29 +0100 Subject: [PATCH 3/3] slopeclockpp: bump version --- apps/slopeclockpp/ChangeLog | 3 ++- apps/slopeclockpp/metadata.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/slopeclockpp/ChangeLog b/apps/slopeclockpp/ChangeLog index 39f837386..43b457d4e 100644 --- a/apps/slopeclockpp/ChangeLog +++ b/apps/slopeclockpp/ChangeLog @@ -10,4 +10,5 @@ 0.08: Stability improvements - ensure we continue even if a flat string can't be allocated Stop ClockInfo text drawing outside the allocated area 0.09: Use clock_info module as an app -0.10: Option to hide widgets, tweak top widget width to avoid overlap with hour text at 9am \ No newline at end of file +0.10: Option to hide widgets, tweak top widget width to avoid overlap with hour text at 9am +0.11: Avoid rendering clkinfo in the same colour as the background diff --git a/apps/slopeclockpp/metadata.json b/apps/slopeclockpp/metadata.json index 086b8148f..00e0b0a77 100644 --- a/apps/slopeclockpp/metadata.json +++ b/apps/slopeclockpp/metadata.json @@ -1,6 +1,6 @@ { "id": "slopeclockpp", "name": "Slope Clock ++", - "version":"0.10", + "version":"0.11", "description": "A clock where hours and minutes are divided by a sloping line. When the minute changes, the numbers slide off the screen. This is a clone of the original Slope Clock which shows extra information and allows the colors to be selected.", "icon": "app.png", "screenshots": [{"url":"screenshot.png"}],