1
0
Fork 0
BangleApps/apps/wid_edit
Rob Pilling 67d89761b5 Fix wid_edit draw() - pass WIDGET as first argument
When attempting to edit a widget whose `draw` function takes the widget as an argument, we get an exception from that `draw` function. This fixes that by catering for both APIs.

The back button widget expects this, as does [`widsleepstatus`], [`widlock`] and [`widlockunlock`].

There are other widgets ([`widmessages`], [`widbatpc`] and [`widalarmeta`]) which use something else for the first parameter, however these are type-checked and used to distinguish calls from `Bangle.drawWidgets()` and elsewhere.

[`widsleepstatus`]: 2f6862024d/apps/widsleepstatus/widget.js (L20)
[`widlock`]: 2f6862024d/apps/widlock/widget.js (L5)
[`widlockunlock`]: 2f6862024d/apps/widlockunlock/widget.js (L27)

[`widmessages`]: 2f6862024d/apps/widmessages/widget.js (L14)
[`widbatpc`]: 2f6862024d/apps/widbatpc/widget.js (L89)
[`widalarmeta`]: 2f6862024d/apps/widalarmeta/widget.js (L28)
2023-04-25 07:22:58 +01:00
..
ChangeLog wid_edit - Bump version 2022-11-06 19:45:32 +01:00
README.md wid_edit: only allow top row, don't "disable" widgets 2022-01-17 20:54:33 +01:00
boot.js wid_edit - Access global variables explicitly 2022-11-06 19:24:28 +01:00
icon.png wid_edit: only allow top row, don't "disable" widgets 2022-01-17 20:54:33 +01:00
metadata.json wid_edit - Bump version 2022-11-06 19:45:32 +01:00
settings.js Fix wid_edit draw() - pass WIDGET as first argument 2023-04-25 07:22:58 +01:00

README.md

Widget Editor

This adds a setting menu which allows you to change the location of widgets.

Settings

There is no app icon in the launcher; you can find the settings under
Apps->Widget Editor.

For every widget, you have these options:

  • Side: On which side to draw the widget.
  • Sort Order: Changes the order if several widgets use the same side.

Creator

Richard de Boer rigrig+banglejs@tubul.net