From 03d18c61f4b6518645d1cad89bb0ff48ee5bb4f1 Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 19:25:50 +0100 Subject: [PATCH 01/27] create first draft --- apps.json | 13 +++++++++++++ apps/chargingStatus/ChangeLog | 1 + apps/chargingStatus/widget.js | 23 +++++++++++++++++++++++ apps/chargingStatus/widget.png | Bin 0 -> 3724 bytes 4 files changed, 37 insertions(+) create mode 100644 apps/chargingStatus/ChangeLog create mode 100644 apps/chargingStatus/widget.js create mode 100644 apps/chargingStatus/widget.png diff --git a/apps.json b/apps.json index a312b90a3..af5921669 100644 --- a/apps.json +++ b/apps.json @@ -4675,5 +4675,18 @@ "data": [ {"name":"pooqroman.json"} ] + }, + { "id": "chargingStatus", + "name": "Charging Status", + "shortName":"Charging", + "icon": "widget.png", + "version":"0.1", + "type": "widget", + "description": "A simple widget that shows up whenever the watch starts charging.", + "tags": "widget,battery", + "supports": ["BANGLEJS","BANGLEJS2"], + "storage": [ + {"name":"chargingStatus.wid.js","url":"widget.js"} + ] } ] diff --git a/apps/chargingStatus/ChangeLog b/apps/chargingStatus/ChangeLog new file mode 100644 index 000000000..d3175e1ab --- /dev/null +++ b/apps/chargingStatus/ChangeLog @@ -0,0 +1 @@ +0.1: First release. \ No newline at end of file diff --git a/apps/chargingStatus/widget.js b/apps/chargingStatus/widget.js new file mode 100644 index 000000000..72e8bdb26 --- /dev/null +++ b/apps/chargingStatus/widget.js @@ -0,0 +1,23 @@ +(() => { + Bangle.on('charging', (charging) => { + if (charging) { + Bangle.buzz(); + } + Bangle.drawWidgets(); // re-layout widgets + g.flip(); + }); + WIDGETS.chargingStatus = { + area: 'tr', + width: 16, + draw() { + const { + x, + y + } = this; + g.reset(); + if (Bangle.isCharging()) { + g.setColor('#0f0').drawImage(atob("EBCBAf9//3/+f/x//P/4//gH8A/wD+Af/x//P/4//n/+//7/"), x, y); + } + }, + }; +})(); \ No newline at end of file diff --git a/apps/chargingStatus/widget.png b/apps/chargingStatus/widget.png new file mode 100644 index 0000000000000000000000000000000000000000..0097d45efb9d2eaed58999990cf36808f0a7f718 GIT binary patch literal 3724 zcmXX}3p|tSAAjF%wwAkvm|J2fhdQm%a#@8))L`>;NReySL3Lc} zR7AFOBBk(mDa$2ml2O>`Xll0q>;L(`pU?Yw-|zFh&+qpAJ-_$&WKqZmRX6Hy1OPzQ z!`;Oj06^#!1U4X{N5I*-FzA7Z-|ykO0lF9)LNXzYrnw)F2LROR^&7NLDH($X_2{nt zbf4HTdScMoP#`fe(Izq`Dn2-f7HSiFHvHy-gFXPLp*>vo`6iXkPei>AJ(kRqC|;?+ zbBQKG7Hhw!wvsOgr*r#y#Lg3*?E(n(;r{) z^sUp3HK}wA!@fSB`HZE?J5a6X(IY&?TV%ic#bINBinZEnPw&&U68=AvyE~M=V2aB* zA!;b2um$7}<$IZjDBi@t5V^2YDP8|s6$k(8#^~_BkWGgCy*MwAQ)9|fTet1<<5X;u ziJ6Z_d8$Q?uELrY>t0+y{AMQbyD|cFU<>Mr5B%t`xg2fYmSDMaVy(N&Djz_IRRn1m z8T0cKvP<$i2zub!9`qwkRL9X*(!V^8YR8)ddKi{~F=6+Gm7y|6xQFAC8qQXJFhW0* z1D-e>pX(e6_rK{Jdal=tm-1)TyS2(9ENhTt=(c>@sIcQlKdiE^;vsPcL8(=d>cHrk` zSW?)*yy;rtHn>M6DSzR);_mVvjlN~T9L=a#ok8zHS7{JfOKW=K;#}jQR7k}QFox4M zzzi=diq|Z_Efb#D%8v_PlwHopci2EyG;8}8#Tgdh#6g4YKNJp=T4r8C$`i+xsP1!m zBh{S_N|rt&-RZwo0Gm3IlnPyVtd~?uV4dd!JwL+(NTZ8$%Q%zzT6r#hWNqGl%h(yS z9P2mDlMQi{1|<*uiAx@VGW8FBY|p2KOOU6|uOFIBf51`ooc28l<`V1xc4&9+> z`LsZj8WasYBfuHijFD*q>mNRFasDS>mY$;GI^cc8f&J;io_ag^sHELMxe(7)zxr4j z&bA0WUc%WkO@yrdZoS>-mjzH|sQYF7myu8Za);sF@Ua)p^1y4saXqilRR1uRXXa{R zJj^m*mFiD6Uu+J%`3-Pqo93>KO74H$?wddco;4fTJBSxk(I!fJHt}7?+Y~y~prvDn zMr-;pezFI=Q?u7CBahr#UorpjuJ49#!1u+|LPfa)XzBY^*)x8xwscu!)&#o0oA>ld zx>}>?ONtjh+?I(UF@HkkW|B{%EC8#T3oOMJc{wxO;6_4g!Kl+g#=zp0oXG3j>gO{$ zjek6xTKVhMF*8WC#oSPOUiV3s^4nV7($a|)CxagkTS5OFSQ7J#=Q7+lEf{WjL$%7e zc%TvrrY*?n{GI^iPz|Qxq!w+DB%`C2uVzhdiK$OX+Y3dg5gKQf_51HTpv*5@r2w_;mS8uCKL9$~HFCDJ)D+87`_dvWrjH7blkF*rIPB8}g z!k77H;vvZnG12Z47x#yIGNh*~%woJGA$81gxO;d6l%Jn(VJJof7X3ZSVLLGk4TTAf zCFy&zAJi1yIFBKjM+1=z6}~Mo%Zd+h&`()GMo^&Z`YN^SwI*>LtlF%3JlESS@^GUC z1abls3V0n^8i;^^zx@Aypa*Mnx@?#E`Wl=Ntv{k5phdW;;hv>(^$P32J(kKF4c8snybRRq%W+i5e%r-65513fieiJdM4vlgbzjnmt-k}Jm&s-+mbmO;; zrLk$-&SQ8HeSZse8Rh4*jmrSHID9XErjI%CXpr&Y^Qg$>$w$Nv?&T(_(p}4Y(!bGE zr$$h|i-^t`BQ3Y)p>APjOEJ8ulZZ0o^50W}%$0PwpB`P2_LpHLadu7W8B1E!el=iW zToU+ZK8JU`rqI31ljV3atIJkuB)%px^F9mXmv^V150g1-wpbCb7L@@BiCc8If^8eu zJ>aB#4tUh*+Ekqvjs%x`$gUP@8h>V+*KI=qTyuF> zcxQLp(Q{4*WXk=SdB#WIA)9Wp!~p`7?}~b(V~RQLH@eoIR0cx zNp&kUjlaPzA3au~9F6;*>U!UX=RT}A_?f47#(H^Zd`{Jghvl$#{mX$l)4spT9v*j( zAI3N)=u0H7h~eE}yRJQMUAGFugovL0cay`)u2QjX#rCg}!oVaq#<=>IOLv6LmCd`z z2lI|T+ga6}4wItA45}yHG|l@vPB2N8+-)|v%(OE<0w}Y0w=CPXs3j%SwbFc-5Hz9= zm%3Lh7nv1Z?@oW-C$+xQXWq#bL%tv!3>_P^Y{3e6nGVF;2M0li$n5*QPA^^*%g@!K zn#P6Y!i=)Xoc=>M0r|S|51OSj#|9Bi8ZD~!1fpg}n`)9~FPimu~kMsggWS z5n5oyGvu)cvMk5_*gjAZ$o9sum|a4@wA=sy4% zT*+C_VHCrfm{o064a$x}KktnAh*H*b%6_=m_*5cz7ZP<#OP}``Dg-T|cq~ib2dzp~ z7573r=TjSR1d@2K7JRIsnBBECHX1J903(Qr-wydDq>4X*O+VBuq1w~cC3{oW6U+_SstFPs}J;JMdG%BAWf!1l=WIWNNp;Be3jRjOgH zUz!z&B^h31plLe2ntyQ66K*maxmg@$nsM&wrcdd@%gN(>wRW?v!Yyw?G`)7Z>V9pB z3(dATaHsb}r|xo# zdiN5v0tL$%&I?=2n|_xHD{KicRBZ|jZ}$!8A^iSX5zkiSlJ{>Lc$LMxRJnaYNyp;k z(@)a~%A<}WK=^>{dF6VG@pdK^h(R_$MK*!Jy8mx0XkFW?LNURT-hEF&({|H>=~~{i z9S3D@lMNC}T1by;6rBu&ex5?mcGCRT=T=|@j3Re3_Xm5;+vbG#l!;I|eZ<~zHrsry zaw^MKnjqWE-#eSVn*dq$=J8hEG@dKIYt#%D-93V3jewI^$otzKK*$!uOAxFLctrF^ z1JiS!@D_uX-9&UfVMK!~d5lgESV%DSb%FA1_pSjW9ceJT2#M2-TsfyP8Zz zu~9Gr>t|Olpb}hA`94;V&{817GP&@I(%`tcTnwqi)CP2d$q0hQL!(`WAJe`m^m?D7 z3R0+;WGpXg$=Y*}v9dK*5?C2}tibIoel?qk72k4r<-IWmR%|h&DbVKq1T|QkT-SxYF#dA9f??}1Du~r4o&+VAaW-9l3xoyk5$qMyo1zR@y z-xN#Cy=Ft!`%NSJ9aF@jEDY(mw->OTjnZ;_1bYYc6bNxu=Xkf#Mt+V|xTR+{lBOe$ zINyD3xcLn|b)JdYQFu(J&7JZ{7Vbz8ecU9;`Z6? z=bUgsd!W&swU9Ps|{ zsR$E@XVGbxJ%&H}e{>@O=C2ws=4x87)K>A*PW}ki9oFyf9lj80zfxAGoDq)#0gWIZjEOs;YBD*tV) zz>xHCB|z~I9(D}c@)zTBcv6uXA?gT0%VR;^e6Sgsp5?2~Cjn;}9cN5I3C?9#BGdj7ws%F%iN literal 0 HcmV?d00001 From af42aa02b321ece5585534e3ca21b6ec81969d15 Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 19:42:34 +0100 Subject: [PATCH 02/27] Update widget.js --- apps/chargingStatus/widget.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/chargingStatus/widget.js b/apps/chargingStatus/widget.js index 72e8bdb26..20925bfc7 100644 --- a/apps/chargingStatus/widget.js +++ b/apps/chargingStatus/widget.js @@ -10,13 +10,9 @@ area: 'tr', width: 16, draw() { - const { - x, - y - } = this; g.reset(); if (Bangle.isCharging()) { - g.setColor('#0f0').drawImage(atob("EBCBAf9//3/+f/x//P/4//gH8A/wD+Af/x//P/4//n/+//7/"), x, y); + g.setColor('#0f0').drawImage(atob("EBCBAf9//3/+f/x//P/4//gH8A/wD+Af/x//P/4//n/+//7/"), this.x, this.y); } }, }; From 86626ce80531b1557f6b05a6e5664fa5250cc148 Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 19:53:43 +0100 Subject: [PATCH 03/27] test: activate widget always --- apps/chargingStatus/widget.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/chargingStatus/widget.js b/apps/chargingStatus/widget.js index 20925bfc7..a43c0411b 100644 --- a/apps/chargingStatus/widget.js +++ b/apps/chargingStatus/widget.js @@ -11,9 +11,9 @@ width: 16, draw() { g.reset(); - if (Bangle.isCharging()) { + //if (Bangle.isCharging()) { g.setColor('#0f0').drawImage(atob("EBCBAf9//3/+f/x//P/4//gH8A/wD+Af/x//P/4//n/+//7/"), this.x, this.y); - } + //} }, }; })(); \ No newline at end of file From 78800e63d0fa688006d9e6a8f472fca96497e000 Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 19:56:41 +0100 Subject: [PATCH 04/27] Update widget.js --- apps/chargingStatus/widget.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/chargingStatus/widget.js b/apps/chargingStatus/widget.js index a43c0411b..90d048fa4 100644 --- a/apps/chargingStatus/widget.js +++ b/apps/chargingStatus/widget.js @@ -12,7 +12,8 @@ draw() { g.reset(); //if (Bangle.isCharging()) { - g.setColor('#0f0').drawImage(atob("EBCBAf9//3/+f/x//P/4//gH8A/wD+Af/x//P/4//n/+//7/"), this.x, this.y); + g.drawString("X", this.x, this.y); + //g.setColor('#0f0').drawImage(atob("EBCBAf9//3/+f/x//P/4//gH8A/wD+Af/x//P/4//n/+//7/"), this.x, this.y); //} }, }; From c892b155f8b57ebc46f0d264f5d2628cde259aa2 Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 20:00:35 +0100 Subject: [PATCH 05/27] Update apps.json --- apps.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps.json b/apps.json index af5921669..8680dfc97 100644 --- a/apps.json +++ b/apps.json @@ -4680,7 +4680,7 @@ "name": "Charging Status", "shortName":"Charging", "icon": "widget.png", - "version":"0.1", + "version":"0.1.1", "type": "widget", "description": "A simple widget that shows up whenever the watch starts charging.", "tags": "widget,battery", From 107f862723a6fb3000ba4720f32c4e1d6412c39c Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 20:07:54 +0100 Subject: [PATCH 06/27] update version for another test --- apps.json | 2 +- apps/chargingStatus/widget.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps.json b/apps.json index 8680dfc97..146e3a1a0 100644 --- a/apps.json +++ b/apps.json @@ -4680,7 +4680,7 @@ "name": "Charging Status", "shortName":"Charging", "icon": "widget.png", - "version":"0.1.1", + "version":"0.1.2", "type": "widget", "description": "A simple widget that shows up whenever the watch starts charging.", "tags": "widget,battery", diff --git a/apps/chargingStatus/widget.js b/apps/chargingStatus/widget.js index 90d048fa4..1352c2b11 100644 --- a/apps/chargingStatus/widget.js +++ b/apps/chargingStatus/widget.js @@ -6,13 +6,13 @@ Bangle.drawWidgets(); // re-layout widgets g.flip(); }); - WIDGETS.chargingStatus = { + WIDGETS["chargingStatus"] = { area: 'tr', - width: 16, + width: 32, draw() { g.reset(); //if (Bangle.isCharging()) { - g.drawString("X", this.x, this.y); + g.drawString("X", this.x, this.y); //g.setColor('#0f0').drawImage(atob("EBCBAf9//3/+f/x//P/4//gH8A/wD+Af/x//P/4//n/+//7/"), this.x, this.y); //} }, From 168515a2efe4242503494e076f52b6a6a05cd601 Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 20:18:24 +0100 Subject: [PATCH 07/27] Update widget.js --- apps/chargingStatus/widget.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/chargingStatus/widget.js b/apps/chargingStatus/widget.js index 1352c2b11..6a3837ace 100644 --- a/apps/chargingStatus/widget.js +++ b/apps/chargingStatus/widget.js @@ -10,10 +10,13 @@ area: 'tr', width: 32, draw() { - g.reset(); + g.reset(); + g.setColor("#FD0"); // on = amber + //if (Bangle.isCharging()) { - g.drawString("X", this.x, this.y); - //g.setColor('#0f0').drawImage(atob("EBCBAf9//3/+f/x//P/4//gH8A/wD+Af/x//P/4//n/+//7/"), this.x, this.y); + g.drawImage(atob("GBiBAAAAAAAAAAAAAA//8B//+BgYGBgYGBgYGBgYGBgYGBgYGB//+B//+BgYGBgYGBgYGBgYGBgYGBgYGB//+A//8AAAAAAAAAAAAA=="), this.x, 2+this.y); + + //g.setColor('#0f0').drawImage(atob("EBCBAf9//3/+f/x//P/4//gH8A/wD+Af/x//P/4//n/+//7/"), this.x, this.y); //} }, }; From a0e61f0d4bdf2024b4ecd4d07d66c36ad016970d Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 20:19:07 +0100 Subject: [PATCH 08/27] Update apps.json --- apps.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps.json b/apps.json index 146e3a1a0..23a5344e7 100644 --- a/apps.json +++ b/apps.json @@ -4680,7 +4680,7 @@ "name": "Charging Status", "shortName":"Charging", "icon": "widget.png", - "version":"0.1.2", + "version":"0.1.3", "type": "widget", "description": "A simple widget that shows up whenever the watch starts charging.", "tags": "widget,battery", From c320902fc6729b643438ee17582dc69f224da32f Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 20:30:13 +0100 Subject: [PATCH 09/27] move to another folder, add gps draw logic --- apps.json | 6 +-- apps/chargingStatus/widget.js | 23 ----------- .../ChangeLog | 0 apps/widChargingStatus/widget.js | 38 ++++++++++++++++++ .../widget.png | Bin 5 files changed, 41 insertions(+), 26 deletions(-) delete mode 100644 apps/chargingStatus/widget.js rename apps/{chargingStatus => widChargingStatus}/ChangeLog (100%) create mode 100644 apps/widChargingStatus/widget.js rename apps/{chargingStatus => widChargingStatus}/widget.png (100%) diff --git a/apps.json b/apps.json index 23a5344e7..7576d584a 100644 --- a/apps.json +++ b/apps.json @@ -4676,11 +4676,11 @@ {"name":"pooqroman.json"} ] }, - { "id": "chargingStatus", + { "id": "widChargingStatus", "name": "Charging Status", - "shortName":"Charging", + "shortName":"ChargingStatus", "icon": "widget.png", - "version":"0.1.3", + "version":"0.1.4", "type": "widget", "description": "A simple widget that shows up whenever the watch starts charging.", "tags": "widget,battery", diff --git a/apps/chargingStatus/widget.js b/apps/chargingStatus/widget.js deleted file mode 100644 index 6a3837ace..000000000 --- a/apps/chargingStatus/widget.js +++ /dev/null @@ -1,23 +0,0 @@ -(() => { - Bangle.on('charging', (charging) => { - if (charging) { - Bangle.buzz(); - } - Bangle.drawWidgets(); // re-layout widgets - g.flip(); - }); - WIDGETS["chargingStatus"] = { - area: 'tr', - width: 32, - draw() { - g.reset(); - g.setColor("#FD0"); // on = amber - - //if (Bangle.isCharging()) { - g.drawImage(atob("GBiBAAAAAAAAAAAAAA//8B//+BgYGBgYGBgYGBgYGBgYGBgYGB//+B//+BgYGBgYGBgYGBgYGBgYGBgYGB//+A//8AAAAAAAAAAAAA=="), this.x, 2+this.y); - - //g.setColor('#0f0').drawImage(atob("EBCBAf9//3/+f/x//P/4//gH8A/wD+Af/x//P/4//n/+//7/"), this.x, this.y); - //} - }, - }; -})(); \ No newline at end of file diff --git a/apps/chargingStatus/ChangeLog b/apps/widChargingStatus/ChangeLog similarity index 100% rename from apps/chargingStatus/ChangeLog rename to apps/widChargingStatus/ChangeLog diff --git a/apps/widChargingStatus/widget.js b/apps/widChargingStatus/widget.js new file mode 100644 index 000000000..3c953ce17 --- /dev/null +++ b/apps/widChargingStatus/widget.js @@ -0,0 +1,38 @@ +(() => { + Bangle.on('charging', (charging) => { + if (charging) { + Bangle.buzz(); + } + Bangle.drawWidgets(); // re-layout widgets + g.flip(); + }); + + function draw() { + g.reset(); + g.setColor("#FD0"); // on = amber + //if (Bangle.isCharging()) { + g.drawImage(atob("GBiBAAAAAAAAAAAAAA//8B//+BgYGBgYGBgYGBgYGBgYGBgYGB//+B//+BgYGBgYGBgYGBgYGBgYGBgYGB//+A//8AAAAAAAAAAAAA=="), this.x, 2 + this.y); + //g.setColor('#0f0').drawImage(atob("EBCBAf9//3/+f/x//P/4//gH8A/wD+Af/x//P/4//n/+//7/"), this.x, this.y); + //} + } + + WIDGETS.chargingStatus = { + area: 'tr', + width: 32, + draw: draw, + }; + + function gpsDraw() { + g.reset(); + g.setColor("#FD0"); // on = amber + + g.drawImage(atob("GBiBAAAAAAAAAAAAAA//8B//+BgYGBgYGBgYGBgYGBgYGBgYGB//+B//+BgYGBgYGBgYGBgYGBgYGBgYGB//+A//8AAAAAAAAAAAAA=="), this.x, 2 + this.y); + + } + WIDGETS.gpsT = { + area: "tr", + width: 24, + draw: gpsDraw + }; + +})(); \ No newline at end of file diff --git a/apps/chargingStatus/widget.png b/apps/widChargingStatus/widget.png similarity index 100% rename from apps/chargingStatus/widget.png rename to apps/widChargingStatus/widget.png From c2b731a972699307063fdf106af66bdab43f3c13 Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 20:34:45 +0100 Subject: [PATCH 10/27] attempt to draw what we want to see --- apps.json | 2 +- apps/widChargingStatus/widget.js | 14 +------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/apps.json b/apps.json index 7576d584a..a0616c635 100644 --- a/apps.json +++ b/apps.json @@ -4680,7 +4680,7 @@ "name": "Charging Status", "shortName":"ChargingStatus", "icon": "widget.png", - "version":"0.1.4", + "version":"0.1.5", "type": "widget", "description": "A simple widget that shows up whenever the watch starts charging.", "tags": "widget,battery", diff --git a/apps/widChargingStatus/widget.js b/apps/widChargingStatus/widget.js index 3c953ce17..4f77351e1 100644 --- a/apps/widChargingStatus/widget.js +++ b/apps/widChargingStatus/widget.js @@ -11,8 +11,7 @@ g.reset(); g.setColor("#FD0"); // on = amber //if (Bangle.isCharging()) { - g.drawImage(atob("GBiBAAAAAAAAAAAAAA//8B//+BgYGBgYGBgYGBgYGBgYGBgYGB//+B//+BgYGBgYGBgYGBgYGBgYGBgYGB//+A//8AAAAAAAAAAAAA=="), this.x, 2 + this.y); - //g.setColor('#0f0').drawImage(atob("EBCBAf9//3/+f/x//P/4//gH8A/wD+Af/x//P/4//n/+//7/"), this.x, this.y); + g.setColor('#0f0').drawImage(atob("EBCBAf9//3/+f/x//P/4//gH8A/wD+Af/x//P/4//n/+//7/"), this.x, this.y); //} } @@ -22,17 +21,6 @@ draw: draw, }; - function gpsDraw() { - g.reset(); - g.setColor("#FD0"); // on = amber - g.drawImage(atob("GBiBAAAAAAAAAAAAAA//8B//+BgYGBgYGBgYGBgYGBgYGBgYGB//+B//+BgYGBgYGBgYGBgYGBgYGBgYGB//+A//8AAAAAAAAAAAAA=="), this.x, 2 + this.y); - - } - WIDGETS.gpsT = { - area: "tr", - width: 24, - draw: gpsDraw - }; })(); \ No newline at end of file From 67c72d337e7f7e70c67d0c3627eb5257192f3cfd Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 20:44:17 +0100 Subject: [PATCH 11/27] attempt to use correct image for rendering --- apps.json | 2 +- apps/widChargingStatus/widget.js | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/apps.json b/apps.json index a0616c635..9eba02710 100644 --- a/apps.json +++ b/apps.json @@ -4680,7 +4680,7 @@ "name": "Charging Status", "shortName":"ChargingStatus", "icon": "widget.png", - "version":"0.1.5", + "version":"0.1.6", "type": "widget", "description": "A simple widget that shows up whenever the watch starts charging.", "tags": "widget,battery", diff --git a/apps/widChargingStatus/widget.js b/apps/widChargingStatus/widget.js index 4f77351e1..b75335c45 100644 --- a/apps/widChargingStatus/widget.js +++ b/apps/widChargingStatus/widget.js @@ -7,17 +7,25 @@ g.flip(); }); + const chargingSymbol = { + width: 16, + height: 16, + bpp: 1, + transparent: 1, + buffer: require("heatshrink").decompress(atob("/9/AIP+v/8AIP//ABBg/wh4BB8Ef/4BBn/+AIIXB/4BB")) + }; + function draw() { g.reset(); - g.setColor("#FD0"); // on = amber + g.setColor("#FD0"); //if (Bangle.isCharging()) { - g.setColor('#0f0').drawImage(atob("EBCBAf9//3/+f/x//P/4//gH8A/wD+Af/x//P/4//n/+//7/"), this.x, this.y); + g.drawImage(chargingSymbol, this.x + 2, this.y); //} } WIDGETS.chargingStatus = { area: 'tr', - width: 32, + width: 20, draw: draw, }; From 772d0a8724999dc25c5aa76ad618d20e89b5b402 Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 20:47:31 +0100 Subject: [PATCH 12/27] draw X --- apps.json | 2 +- apps/widChargingStatus/widget.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps.json b/apps.json index 9eba02710..87750ad2c 100644 --- a/apps.json +++ b/apps.json @@ -4680,7 +4680,7 @@ "name": "Charging Status", "shortName":"ChargingStatus", "icon": "widget.png", - "version":"0.1.6", + "version":"0.1.7", "type": "widget", "description": "A simple widget that shows up whenever the watch starts charging.", "tags": "widget,battery", diff --git a/apps/widChargingStatus/widget.js b/apps/widChargingStatus/widget.js index b75335c45..bd46b0847 100644 --- a/apps/widChargingStatus/widget.js +++ b/apps/widChargingStatus/widget.js @@ -19,7 +19,8 @@ g.reset(); g.setColor("#FD0"); //if (Bangle.isCharging()) { - g.drawImage(chargingSymbol, this.x + 2, this.y); + // g.drawImage(chargingSymbol, this.x + 2, this.y); + g.drawString('X',this.x,this.y) //} } From 4e4cc3e93085061e497c93050f133774c75cf5dc Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 20:50:24 +0100 Subject: [PATCH 13/27] attempt to draw icon again --- apps.json | 2 +- apps/widChargingStatus/widget.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps.json b/apps.json index 87750ad2c..6c223e7d2 100644 --- a/apps.json +++ b/apps.json @@ -4680,7 +4680,7 @@ "name": "Charging Status", "shortName":"ChargingStatus", "icon": "widget.png", - "version":"0.1.7", + "version":"0.1.8", "type": "widget", "description": "A simple widget that shows up whenever the watch starts charging.", "tags": "widget,battery", diff --git a/apps/widChargingStatus/widget.js b/apps/widChargingStatus/widget.js index bd46b0847..120741b27 100644 --- a/apps/widChargingStatus/widget.js +++ b/apps/widChargingStatus/widget.js @@ -17,10 +17,10 @@ function draw() { g.reset(); - g.setColor("#FD0"); + //g.setColor("#FD0"); //if (Bangle.isCharging()) { - // g.drawImage(chargingSymbol, this.x + 2, this.y); - g.drawString('X',this.x,this.y) + g.drawImage(chargingSymbol, this.x /* + 2 */ , this.y); + //g.drawString('X',this.x,this.y) //} } From 5efc380b83dbf8481c0482139c77c9a442fa16df Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 20:54:29 +0100 Subject: [PATCH 14/27] use inverted icon --- apps.json | 2 +- apps/widChargingStatus/widget.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps.json b/apps.json index 6c223e7d2..9bb299bec 100644 --- a/apps.json +++ b/apps.json @@ -4680,7 +4680,7 @@ "name": "Charging Status", "shortName":"ChargingStatus", "icon": "widget.png", - "version":"0.1.8", + "version":"0.1.9", "type": "widget", "description": "A simple widget that shows up whenever the watch starts charging.", "tags": "widget,battery", diff --git a/apps/widChargingStatus/widget.js b/apps/widChargingStatus/widget.js index 120741b27..9fd9bdc01 100644 --- a/apps/widChargingStatus/widget.js +++ b/apps/widChargingStatus/widget.js @@ -7,17 +7,17 @@ g.flip(); }); - const chargingSymbol = { + const chargingIcon = { width: 16, height: 16, bpp: 1, - transparent: 1, - buffer: require("heatshrink").decompress(atob("/9/AIP+v/8AIP//ABBg/wh4BB8Ef/4BBn/+AIIXB/4BB")) - }; + transparent: 0, + buffer: require("heatshrink").decompress(atob("gGAAIMBwEDAIMAg4BB/EP+ABBj/ggABB4EBAIIXBgABB")) + } function draw() { g.reset(); - //g.setColor("#FD0"); + g.setColor("#FD0"); //if (Bangle.isCharging()) { g.drawImage(chargingSymbol, this.x /* + 2 */ , this.y); //g.drawString('X',this.x,this.y) From 4814120de63d81c1e7840e71dac70d29d56a565e Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 20:56:59 +0100 Subject: [PATCH 15/27] draw string --- apps.json | 2 +- apps/widChargingStatus/widget.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps.json b/apps.json index 9bb299bec..b29b2717a 100644 --- a/apps.json +++ b/apps.json @@ -4680,7 +4680,7 @@ "name": "Charging Status", "shortName":"ChargingStatus", "icon": "widget.png", - "version":"0.1.9", + "version":"0.1.10", "type": "widget", "description": "A simple widget that shows up whenever the watch starts charging.", "tags": "widget,battery", diff --git a/apps/widChargingStatus/widget.js b/apps/widChargingStatus/widget.js index 9fd9bdc01..723a10374 100644 --- a/apps/widChargingStatus/widget.js +++ b/apps/widChargingStatus/widget.js @@ -18,9 +18,10 @@ function draw() { g.reset(); g.setColor("#FD0"); + g.setFontVector(16); //if (Bangle.isCharging()) { - g.drawImage(chargingSymbol, this.x /* + 2 */ , this.y); - //g.drawString('X',this.x,this.y) + // g.drawImage(chargingIcon, this.x /* + 2 */ , this.y); + g.drawString('X',this.x,this.y) //} } From d3b586635cc380ab9f12d797579c893c80fa7919 Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 21:02:14 +0100 Subject: [PATCH 16/27] use larger icon --- apps.json | 2 +- apps/widChargingStatus/widget.js | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/apps.json b/apps.json index b29b2717a..8ac5a1de5 100644 --- a/apps.json +++ b/apps.json @@ -4680,7 +4680,7 @@ "name": "Charging Status", "shortName":"ChargingStatus", "icon": "widget.png", - "version":"0.1.10", + "version":"0.1.11", "type": "widget", "description": "A simple widget that shows up whenever the watch starts charging.", "tags": "widget,battery", diff --git a/apps/widChargingStatus/widget.js b/apps/widChargingStatus/widget.js index 723a10374..974e08aa7 100644 --- a/apps/widChargingStatus/widget.js +++ b/apps/widChargingStatus/widget.js @@ -8,26 +8,25 @@ }); const chargingIcon = { - width: 16, - height: 16, + width: 32, + height: 32, bpp: 1, - transparent: 0, - buffer: require("heatshrink").decompress(atob("gGAAIMBwEDAIMAg4BB/EP+ABBj/ggABB4EBAIIXBgABB")) + transparent: 1, + buffer: require("heatshrink").decompress(atob("///34CB/8/AYv+AYX8AYd/AYP4AY3wAY3gAYXAAYcAEAOAAYgMBHwYDC/0AgIyBAYkDIYQDDg4DGh4DCj4DGL45DCAYhyC/oCBA=")) } function draw() { g.reset(); g.setColor("#FD0"); - g.setFontVector(16); //if (Bangle.isCharging()) { - // g.drawImage(chargingIcon, this.x /* + 2 */ , this.y); - g.drawString('X',this.x,this.y) + g.drawImage(chargingIcon, this.x /* + 2 */ , this.y); + //g.drawString('X',this.x,this.y) //} } WIDGETS.chargingStatus = { area: 'tr', - width: 20, + width: 32, draw: draw, }; From 6b8c201ff22bf37c85b07ae060dc53aeb248add4 Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 21:08:40 +0100 Subject: [PATCH 17/27] use different export technique --- apps.json | 2 +- apps/widChargingStatus/widget.js | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/apps.json b/apps.json index 8ac5a1de5..fc02b21a7 100644 --- a/apps.json +++ b/apps.json @@ -4680,7 +4680,7 @@ "name": "Charging Status", "shortName":"ChargingStatus", "icon": "widget.png", - "version":"0.1.11", + "version":"0.1.12", "type": "widget", "description": "A simple widget that shows up whenever the watch starts charging.", "tags": "widget,battery", diff --git a/apps/widChargingStatus/widget.js b/apps/widChargingStatus/widget.js index 974e08aa7..15a9b53f3 100644 --- a/apps/widChargingStatus/widget.js +++ b/apps/widChargingStatus/widget.js @@ -7,19 +7,11 @@ g.flip(); }); - const chargingIcon = { - width: 32, - height: 32, - bpp: 1, - transparent: 1, - buffer: require("heatshrink").decompress(atob("///34CB/8/AYv+AYX8AYd/AYP4AY3wAY3gAYXAAYcAEAOAAYgMBHwYDC/0AgIyBAYkDIYQDDg4DGh4DCj4DGL45DCAYhyC/oCBA=")) - } - function draw() { g.reset(); - g.setColor("#FD0"); + //g.setColor("#FD0"); //if (Bangle.isCharging()) { - g.drawImage(chargingIcon, this.x /* + 2 */ , this.y); + g.drawImage(atob("kEgwMB///34CB/8/AYv+AYX8AYd/AYP4AY3wAY3gAYXAAYcAEAOAAYgMBIQIPBAYX+gBGB/gDEgZDCAYcHAY0PAYUfAYxfHIYQDEOQX9AQI="), this.x /* + 2 */ , this.y); //g.drawString('X',this.x,this.y) //} } From 9ee26a66efc6827502b9a9b89efbeb6006995c0d Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 21:19:29 +0100 Subject: [PATCH 18/27] use 8bit image --- apps.json | 2 +- apps/widChargingStatus/widget.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps.json b/apps.json index fc02b21a7..413f7edef 100644 --- a/apps.json +++ b/apps.json @@ -4680,7 +4680,7 @@ "name": "Charging Status", "shortName":"ChargingStatus", "icon": "widget.png", - "version":"0.1.12", + "version":"0.1.13", "type": "widget", "description": "A simple widget that shows up whenever the watch starts charging.", "tags": "widget,battery", diff --git a/apps/widChargingStatus/widget.js b/apps/widChargingStatus/widget.js index 15a9b53f3..0fc1e48d9 100644 --- a/apps/widChargingStatus/widget.js +++ b/apps/widChargingStatus/widget.js @@ -9,9 +9,9 @@ function draw() { g.reset(); - //g.setColor("#FD0"); + g.setColor("#FD0"); //if (Bangle.isCharging()) { - g.drawImage(atob("kEgwMB///34CB/8/AYv+AYX8AYd/AYP4AY3wAY3gAYXAAYcAEAOAAYgMBIQIPBAYX+gBGB/gDEgZDCAYcHAY0PAYUfAYxfHIYQDEOQX9AQI="), this.x /* + 2 */ , this.y); + g.drawImage(atob("kEgxH+ACEACSIeMD/p1CDzwffH3wfbDwYf6DwgfZDwofgABAeeD74etH3yc+FCAfeDzAflDzIfEDzQfjDzYffH3wfCDzgfBCKAA="), this.x, this.y); //g.drawString('X',this.x,this.y) //} } From 70bb045be059d63ea5ed99e28150973d88c57e45 Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 22:00:07 +0100 Subject: [PATCH 19/27] use image with 1bit and without specified color --- apps.json | 2 +- apps/widChargingStatus/widget.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps.json b/apps.json index 413f7edef..02c1044fc 100644 --- a/apps.json +++ b/apps.json @@ -4680,7 +4680,7 @@ "name": "Charging Status", "shortName":"ChargingStatus", "icon": "widget.png", - "version":"0.1.13", + "version":"0.1.14", "type": "widget", "description": "A simple widget that shows up whenever the watch starts charging.", "tags": "widget,battery", diff --git a/apps/widChargingStatus/widget.js b/apps/widChargingStatus/widget.js index 0fc1e48d9..b0e503b3a 100644 --- a/apps/widChargingStatus/widget.js +++ b/apps/widChargingStatus/widget.js @@ -9,9 +9,9 @@ function draw() { g.reset(); - g.setColor("#FD0"); + //g.setColor("#FD0"); //if (Bangle.isCharging()) { - g.drawImage(atob("kEgxH+ACEACSIeMD/p1CDzwffH3wfbDwYf6DwgfZDwofgABAeeD74etH3yc+FCAfeDzAflDzIfEDzQfjDzYffH3wfCDzgfBCKAA="), this.x, this.y); + g.drawImage(atob("kEgwMB///34CB/8/AYv+AYX8AYd/AYP4AY3wAY3gAYXAAYcAEAOAAYgMBIQIPBAYX+gBGB/gDEgZDCAYcHAY0PAYUfAYxfHIYQDEOQX9AQI="), this.x, this.y); //g.drawString('X',this.x,this.y) //} } From c7aea28a47f564d79f5e22a5516a36c5d7418546 Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 22:08:07 +0100 Subject: [PATCH 20/27] display text --- apps.json | 4 ++-- apps/widChargingStatus/widget.js | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps.json b/apps.json index 02c1044fc..aa57b01c7 100644 --- a/apps.json +++ b/apps.json @@ -4680,10 +4680,10 @@ "name": "Charging Status", "shortName":"ChargingStatus", "icon": "widget.png", - "version":"0.1.14", + "version":"0.1.15", "type": "widget", "description": "A simple widget that shows up whenever the watch starts charging.", - "tags": "widget,battery", + "tags": "widget", "supports": ["BANGLEJS","BANGLEJS2"], "storage": [ {"name":"chargingStatus.wid.js","url":"widget.js"} diff --git a/apps/widChargingStatus/widget.js b/apps/widChargingStatus/widget.js index b0e503b3a..ed674263e 100644 --- a/apps/widChargingStatus/widget.js +++ b/apps/widChargingStatus/widget.js @@ -9,10 +9,11 @@ function draw() { g.reset(); - //g.setColor("#FD0"); + g.setColor("#FD0"); + g.setFont("Vector", 26); //if (Bangle.isCharging()) { - g.drawImage(atob("kEgwMB///34CB/8/AYv+AYX8AYd/AYP4AY3wAY3gAYXAAYcAEAOAAYgMBIQIPBAYX+gBGB/gDEgZDCAYcHAY0PAYUfAYxfHIYQDEOQX9AQI="), this.x, this.y); - //g.drawString('X',this.x,this.y) + // g.drawImage(atob("kEgwMB///34CB/8/AYv+AYX8AYd/AYP4AY3wAY3gAYXAAYcAEAOAAYgMBIQIPBAYX+gBGB/gDEgZDCAYcHAY0PAYUfAYxfHIYQDEOQX9AQI="), this.x, this.y); + g.drawString('PWR',this.x,this.y) //} } From 1d7a69ce0ab7a74d923154cd8c05262d8ce6bec5 Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 22:22:22 +0100 Subject: [PATCH 21/27] another attempt to use icon correctly --- apps.json | 2 +- apps/widChargingStatus/widget.js | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/apps.json b/apps.json index aa57b01c7..69fc98957 100644 --- a/apps.json +++ b/apps.json @@ -4680,7 +4680,7 @@ "name": "Charging Status", "shortName":"ChargingStatus", "icon": "widget.png", - "version":"0.1.15", + "version":"0.1.16", "type": "widget", "description": "A simple widget that shows up whenever the watch starts charging.", "tags": "widget", diff --git a/apps/widChargingStatus/widget.js b/apps/widChargingStatus/widget.js index ed674263e..c90a6adb6 100644 --- a/apps/widChargingStatus/widget.js +++ b/apps/widChargingStatus/widget.js @@ -7,13 +7,15 @@ g.flip(); }); + const icon = require("heatshrink").decompress(atob("kEgwMB///34CB/8/AYv+AYX8AYd/AYP4AY3wAY3gAYXAAYcAEAOAAYgMBIQIPBAYX+gBGB/gDEgZDCAYcHAY0PAYUfAYxfHIYQDEOQX9AQI=")) + function draw() { g.reset(); - g.setColor("#FD0"); - g.setFont("Vector", 26); + g.setColor("#FD0"); + //g.setFont("Vector", 26); //if (Bangle.isCharging()) { - // g.drawImage(atob("kEgwMB///34CB/8/AYv+AYX8AYd/AYP4AY3wAY3gAYXAAYcAEAOAAYgMBIQIPBAYX+gBGB/gDEgZDCAYcHAY0PAYUfAYxfHIYQDEOQX9AQI="), this.x, this.y); - g.drawString('PWR',this.x,this.y) + g.drawImage(icon, this.x, this.y); + //g.drawString('PWR', this.x, this.y) //} } From 6989466aba8fc7ed38f40c3a1af73942a3a178a1 Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 22:26:55 +0100 Subject: [PATCH 22/27] export image differently --- apps.json | 2 +- apps/widChargingStatus/widget.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps.json b/apps.json index 69fc98957..1c22a48d7 100644 --- a/apps.json +++ b/apps.json @@ -4680,7 +4680,7 @@ "name": "Charging Status", "shortName":"ChargingStatus", "icon": "widget.png", - "version":"0.1.16", + "version":"0.1.17", "type": "widget", "description": "A simple widget that shows up whenever the watch starts charging.", "tags": "widget", diff --git a/apps/widChargingStatus/widget.js b/apps/widChargingStatus/widget.js index c90a6adb6..deff019ae 100644 --- a/apps/widChargingStatus/widget.js +++ b/apps/widChargingStatus/widget.js @@ -7,7 +7,7 @@ g.flip(); }); - const icon = require("heatshrink").decompress(atob("kEgwMB///34CB/8/AYv+AYX8AYd/AYP4AY3wAY3gAYXAAYcAEAOAAYgMBIQIPBAYX+gBGB/gDEgZDCAYcHAY0PAYUfAYxfHIYQDEOQX9AQI=")) + const icon = require("heatshrink").decompress(atob("kEggIEBoAIC4ADFgIDCgYDDwADBg4DGh4DGj4DCn4DD/4gBv4DEBgP//4PBAYUB//+GQIDE/hDCAYf4AY3wAYXgAYxfHIYQDEOQUCAQI")); function draw() { g.reset(); From 1a320a56c752b75e5ad63265270ae70ec6434c40 Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 22:30:02 +0100 Subject: [PATCH 23/27] scale icon --- apps.json | 2 +- apps/widChargingStatus/widget.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps.json b/apps.json index 1c22a48d7..736e010c4 100644 --- a/apps.json +++ b/apps.json @@ -4680,7 +4680,7 @@ "name": "Charging Status", "shortName":"ChargingStatus", "icon": "widget.png", - "version":"0.1.17", + "version":"0.1.18", "type": "widget", "description": "A simple widget that shows up whenever the watch starts charging.", "tags": "widget", diff --git a/apps/widChargingStatus/widget.js b/apps/widChargingStatus/widget.js index deff019ae..9978d0ef9 100644 --- a/apps/widChargingStatus/widget.js +++ b/apps/widChargingStatus/widget.js @@ -12,16 +12,16 @@ function draw() { g.reset(); g.setColor("#FD0"); - //g.setFont("Vector", 26); //if (Bangle.isCharging()) { - g.drawImage(icon, this.x, this.y); - //g.drawString('PWR', this.x, this.y) + g.drawImage(icon, this.x, this.y + 2, { + scale: 0.8125 + }); //} } WIDGETS.chargingStatus = { area: 'tr', - width: 32, + width: 26, draw: draw, }; From cf36400faa5f05e4a10a5546cbcc247a68c48edf Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 22:37:16 +0100 Subject: [PATCH 24/27] prepare first release --- apps.json | 2 +- apps/widChargingStatus/ChangeLog | 2 +- apps/widChargingStatus/widget.js | 34 ++++++++++++++++---------------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/apps.json b/apps.json index 736e010c4..880c17660 100644 --- a/apps.json +++ b/apps.json @@ -4680,7 +4680,7 @@ "name": "Charging Status", "shortName":"ChargingStatus", "icon": "widget.png", - "version":"0.1.18", + "version":"0.1.0", "type": "widget", "description": "A simple widget that shows up whenever the watch starts charging.", "tags": "widget", diff --git a/apps/widChargingStatus/ChangeLog b/apps/widChargingStatus/ChangeLog index d3175e1ab..16675015d 100644 --- a/apps/widChargingStatus/ChangeLog +++ b/apps/widChargingStatus/ChangeLog @@ -1 +1 @@ -0.1: First release. \ No newline at end of file +0.1.0: First release. \ No newline at end of file diff --git a/apps/widChargingStatus/widget.js b/apps/widChargingStatus/widget.js index 9978d0ef9..686a120db 100644 --- a/apps/widChargingStatus/widget.js +++ b/apps/widChargingStatus/widget.js @@ -1,30 +1,30 @@ (() => { - Bangle.on('charging', (charging) => { - if (charging) { - Bangle.buzz(); - } - Bangle.drawWidgets(); // re-layout widgets - g.flip(); - }); - const icon = require("heatshrink").decompress(atob("kEggIEBoAIC4ADFgIDCgYDDwADBg4DGh4DGj4DCn4DD/4gBv4DEBgP//4PBAYUB//+GQIDE/hDCAYf4AY3wAYXgAYxfHIYQDEOQUCAQI")); function draw() { g.reset(); - g.setColor("#FD0"); - //if (Bangle.isCharging()) { - g.drawImage(icon, this.x, this.y + 2, { - scale: 0.8125 - }); - //} + if (Bangle.isCharging()) { + g.setColor("#FD0"); + g.drawImage(icon, this.x, this.y + 1, { + scale: 0.6875 + }); + } } WIDGETS.chargingStatus = { area: 'tr', - width: 26, + width: 22, draw: draw, }; - - + Bangle.on('charging', (charging) => { + if (charging) { + Bangle.buzz(); + WIDGETS.chargingStatus.width = 22; + } else { + WIDGETS.chargingStatus.width = 0; + } + Bangle.drawWidgets(); // re-layout widgets + g.flip(); + }); })(); \ No newline at end of file From 9ad0ccd1bfbc03b8ae9a7a235e2ea7679c43f6f6 Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 22:47:27 +0100 Subject: [PATCH 25/27] make width smaller, default to not having width --- apps.json | 2 +- apps/widChargingStatus/widget.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps.json b/apps.json index 880c17660..fd788f8d3 100644 --- a/apps.json +++ b/apps.json @@ -4682,7 +4682,7 @@ "icon": "widget.png", "version":"0.1.0", "type": "widget", - "description": "A simple widget that shows up whenever the watch starts charging.", + "description": "A simple widget that shows a yellow lightning icon to indicate whenever the watch is charging. This way one can see if the watch is charging at a glance, no matter which battery widget is being used.", "tags": "widget", "supports": ["BANGLEJS","BANGLEJS2"], "storage": [ diff --git a/apps/widChargingStatus/widget.js b/apps/widChargingStatus/widget.js index 686a120db..a4c862101 100644 --- a/apps/widChargingStatus/widget.js +++ b/apps/widChargingStatus/widget.js @@ -1,5 +1,5 @@ (() => { - const icon = require("heatshrink").decompress(atob("kEggIEBoAIC4ADFgIDCgYDDwADBg4DGh4DGj4DCn4DD/4gBv4DEBgP//4PBAYUB//+GQIDE/hDCAYf4AY3wAYXgAYxfHIYQDEOQUCAQI")); + const icon = require("heatshrink").decompress(atob("ikggMAiEAgYIBmEAg4EB+EAh0AgPggEeCAIEBnwQBAgP+gEP//x///j//8f//k///H//4BYOP/4lBv4bDvwEB4EAvAEBwEAuA7DCAI7BgAQBhEAA")); function draw() { g.reset(); @@ -13,14 +13,14 @@ WIDGETS.chargingStatus = { area: 'tr', - width: 22, + width: Bangle.isCharging() ? 20 : 0, draw: draw, }; Bangle.on('charging', (charging) => { if (charging) { Bangle.buzz(); - WIDGETS.chargingStatus.width = 22; + WIDGETS.chargingStatus.width = 20; } else { WIDGETS.chargingStatus.width = 0; } From 14d1b23bd49184e8920558975bba28e9ac3425ce Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 22:51:40 +0100 Subject: [PATCH 26/27] give some breathing space to icons on the left --- apps.json | 2 +- apps/widChargingStatus/widget.js | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps.json b/apps.json index fd788f8d3..1432eee96 100644 --- a/apps.json +++ b/apps.json @@ -4682,7 +4682,7 @@ "icon": "widget.png", "version":"0.1.0", "type": "widget", - "description": "A simple widget that shows a yellow lightning icon to indicate whenever the watch is charging. This way one can see if the watch is charging at a glance, no matter which battery widget is being used.", + "description": "A simple widget that shows a yellow lightning icon to indicate whenever the watch is charging. This way one can see the charging status at a glance, no matter which battery widget is being used.", "tags": "widget", "supports": ["BANGLEJS","BANGLEJS2"], "storage": [ diff --git a/apps/widChargingStatus/widget.js b/apps/widChargingStatus/widget.js index a4c862101..90f9199fa 100644 --- a/apps/widChargingStatus/widget.js +++ b/apps/widChargingStatus/widget.js @@ -1,11 +1,12 @@ (() => { const icon = require("heatshrink").decompress(atob("ikggMAiEAgYIBmEAg4EB+EAh0AgPggEeCAIEBnwQBAgP+gEP//x///j//8f//k///H//4BYOP/4lBv4bDvwEB4EAvAEBwEAuA7DCAI7BgAQBhEAA")); + const iconWidth = 18; function draw() { g.reset(); if (Bangle.isCharging()) { g.setColor("#FD0"); - g.drawImage(icon, this.x, this.y + 1, { + g.drawImage(icon, this.x + 1, this.y + 1, { scale: 0.6875 }); } @@ -13,14 +14,14 @@ WIDGETS.chargingStatus = { area: 'tr', - width: Bangle.isCharging() ? 20 : 0, + width: Bangle.isCharging() ? iconWidth : 0, draw: draw, }; Bangle.on('charging', (charging) => { if (charging) { Bangle.buzz(); - WIDGETS.chargingStatus.width = 20; + WIDGETS.chargingStatus.width = iconWidth; } else { WIDGETS.chargingStatus.width = 0; } From 4fd2ab6d6a05ff160fb63731e1e72d02718417a0 Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Sat, 4 Dec 2021 23:07:43 +0100 Subject: [PATCH 27/27] fix id and versioning --- apps.json | 4 ++-- apps/widChargingStatus/ChangeLog | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps.json b/apps.json index 1432eee96..59b3892a5 100644 --- a/apps.json +++ b/apps.json @@ -4680,13 +4680,13 @@ "name": "Charging Status", "shortName":"ChargingStatus", "icon": "widget.png", - "version":"0.1.0", + "version":"0.1", "type": "widget", "description": "A simple widget that shows a yellow lightning icon to indicate whenever the watch is charging. This way one can see the charging status at a glance, no matter which battery widget is being used.", "tags": "widget", "supports": ["BANGLEJS","BANGLEJS2"], "storage": [ - {"name":"chargingStatus.wid.js","url":"widget.js"} + {"name":"widChargingStatus.wid.js","url":"widget.js"} ] } ] diff --git a/apps/widChargingStatus/ChangeLog b/apps/widChargingStatus/ChangeLog index 16675015d..d3175e1ab 100644 --- a/apps/widChargingStatus/ChangeLog +++ b/apps/widChargingStatus/ChangeLog @@ -1 +1 @@ -0.1.0: First release. \ No newline at end of file +0.1: First release. \ No newline at end of file