Skip to content

Commit bdd4d70

Browse files
committed
Bangle.setUI: fix back btn not drawn in leftmost position
The bug seems to have snuck in when the back widget was no longer set with Object.assign in commit 453def8 .
1 parent bd3da78 commit bdd4d70

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
ESP32: Remove FlashFS, adjust partitions to increase available Storage from 256kB to 896kB
3131
Storage: Don't attempt to compact if it's obvious that we don't have space for the file even when compacted
3232
Increase Packet timeout from 1 to 5 sec (increase reliability over slow Bluetooth LE connections)
33+
Bangle.js: fix .setUI back button stopped being drawn in the leftmost position after recent changes.
3334

3435
2v25 : ESP32C3: Get analogRead working correctly
3536
Graphics: Adjust image alignment when rotating images to avoid cropping (fix #2535)

libs/js/banglejs/Bangle_setUI_F18.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
};
111111
Bangle.prependListener("touch", touchHandler);
112112
// add widget - 'remove' function will remove the widgets
113-
WIDGETS.back = {
113+
WIDGETS = Object.assign({back:{
114114
area:"tl", width:24,
115115
draw:e=>g.reset().setColor("#f00").drawImage(atob("GBiBAAAYAAH/gAf/4A//8B//+D///D///H/P/n+H/n8P/n4f/vwAP/wAP34f/n8P/n+H/n/P/j///D///B//+A//8Af/4AH/gAAYAA=="),e.x,e.y),
116116
remove:function(noclear){
@@ -122,7 +122,7 @@
122122
delete WIDGETS.back;
123123
if (!noclear) Bangle.drawWidgets();
124124
}
125-
};
125+
}},global.WIDGETS)
126126
if (!hadBackWidget) Bangle.drawWidgets();
127127
}
128128
}
350 Bytes
Binary file not shown.

libs/js/banglejs/Bangle_setUI_Q3.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
};
138138
Bangle.prependListener("touch", touchHandler);
139139
// add widget - 'remove' function will remove the widgets
140-
WIDGETS.back = {
140+
WIDGETS = Object.assign({back:{
141141
area:"tl", width:24,
142142
draw:e=>g.reset().setColor("#f00").drawImage(atob("GBiBAAAYAAH/gAf/4A//8B//+D///D///H/P/n+H/n8P/n4f/vwAP/wAP34f/n8P/n+H/n/P/j///D///B//+A//8Af/4AH/gAAYAA=="),e.x,e.y),
143143
remove:function(noclear){
@@ -149,7 +149,7 @@
149149
delete WIDGETS.back;
150150
if (!noclear) Bangle.drawWidgets();
151151
}
152-
};
152+
}},global.WIDGETS)
153153
if (!hadBackWidget) Bangle.drawWidgets();
154154
}
155155
}
318 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)