Fix unused vars, increase inline clkinfo width

master
RKBoss6 2025-06-30 21:20:42 -04:00 committed by GitHub
parent 8add27715c
commit de91fbfbb7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 3 deletions

View File

@ -137,7 +137,7 @@ let clockInfoMenuInline;
if(showInlineClkInfo){ if(showInlineClkInfo){
clockInfoMenuInline = require("clock_info").addInteractive(clockInfoItems, { clockInfoMenuInline = require("clock_info").addInteractive(clockInfoItems, {
// Add the dimensions we're rendering to here - these are used to detect taps on the clock info area // Add the dimensions we're rendering to here - these are used to detect taps on the clock info area
x : g.getWidth()/2+6, y: 69, w: 80, h:25, x : g.getWidth()/2+6, y: 69, w: 95, h:25,
// You can add other information here you want to be passed into 'options' in 'draw' // You can add other information here you want to be passed into 'options' in 'draw'
// This function draws the info // This function draws the info
draw : (itm, info, options) => { draw : (itm, info, options) => {
@ -153,7 +153,7 @@ if(showInlineClkInfo){
} }
// we're drawing center-aligned here // we're drawing center-aligned here
var midx = options.x+options.w/2; //var midx = options.x+options.w/2;
var midy=options.y+options.h/2; var midy=options.y+options.h/2;
if (info.img){ if (info.img){
g.drawImage(info.img, options.x+4,midy-7.2,{scale: 0.63}); g.drawImage(info.img, options.x+4,midy-7.2,{scale: 0.63});
@ -212,7 +212,6 @@ let draw = function() {
// pad the date - this clears the background if the date were to change length // pad the date - this clears the background if the date were to change length
var dateStr = require("locale").dow(new Date(), 1)+", " +new Date().getDate(); var dateStr = require("locale").dow(new Date(), 1)+", " +new Date().getDate();
//print(g.stringHeight(dateStr)); //print(g.stringHeight(dateStr));
dateStrWidth=g.stringWidth(dateStr);
g.drawString(" "+dateStr+" ", g.getWidth()/2+6, Y+9, true /*clear background*/); g.drawString(" "+dateStr+" ", g.getWidth()/2+6, Y+9, true /*clear background*/);
Bangle.drawWidgets(); Bangle.drawWidgets();