diff --git a/apps/widgps/ChangeLog b/apps/widgps/ChangeLog index 096f85787..b530843e7 100644 --- a/apps/widgps/ChangeLog +++ b/apps/widgps/ChangeLog @@ -5,4 +5,5 @@ 0.05: Don't poll for GPS status, override setGPSPower handler (fix #1456) 0.06: Periodically update so the always on display does show current GPS fix 0.07: Alternative marker icon (configurable via settings) -0.08: Add ability to hide the icon when GPS is off, for a cleaner appearance. \ No newline at end of file +0.08: Add ability to hide the icon when GPS is off, for a cleaner appearance. +0.09: Do not take widget space if icon is hidden diff --git a/apps/widgps/metadata.json b/apps/widgps/metadata.json index 14cdb81d4..cfd35f5bb 100644 --- a/apps/widgps/metadata.json +++ b/apps/widgps/metadata.json @@ -1,7 +1,7 @@ { "id": "widgps", "name": "GPS Widget", - "version": "0.08", + "version": "0.09", "description": "Tiny widget to show the power and fix status of the GPS/GNSS", "icon": "widget.png", "type": "widget", diff --git a/apps/widgps/widget.js b/apps/widgps/widget.js index ee34d174c..73351eaa6 100644 --- a/apps/widgps/widget.js +++ b/apps/widgps/widget.js @@ -11,13 +11,14 @@ var interval; var oldSetGPSPower = Bangle.setGPSPower; Bangle.setGPSPower = function(on, id) { var isGPSon = oldSetGPSPower(on, id); - WIDGETS.gps.draw(); + WIDGETS.gps.width = !isGPSon && settings.hideWhenGpsOff ? 0 : 24; + Bangle.drawWidgets(); return isGPSon; }; WIDGETS.gps = { area : "tr", - width : 24, + width : !Bangle.isGPSOn() && settings.hideWhenGpsOff ? 0 : 24, draw : function() { g.reset();