-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recorder: add clockinfo #2900
Recorder: add clockinfo #2900
Conversation
8980be4
to
6e0c985
Compare
Great idea, thanks! Does Also, maybe if there is no widget (eg the clock face isn't loading widgets) we should just not create a clockinfo at all? I think
You need to make sure you create a 1bpp icon, ideally transparent, with white as the color of the icon itself. I think most clocks expect 24x24px too - that's what we do for other clockinfos and it should work fine... If there's any trouble post the image up and I can do it here |
Ah yes, it's much nicer like that, and likewise with handling a missing widget - thanks!
Thanks - I believe I have it sorted but can't test on my watch - unable to write and I'm holding off resetting it in case you'd like to debug into the |
Thanks - let's wait until you can test nicely then - thanks for the help debugging storage |
The 1-bit image did the trick, thanks again! I've made a small tweak to There's one problem: if a clock loads Out of the clocks that use both Clocks using `clock_info` & widgetsgrep -l clock_info apps/*/*.js | xargs grep -El 'clock_info|Bangle\.loadWidgets' To fix this I think would be difficult, we'd have to make it so clocks load |
We can't tell whether Bangle.loadWidgets() might be called later, so assume it does, and handle the case where it hasn't been.
Sorted it - we always show the recorder clkinfo and if the widget's not present, the clock hasn't run |
Looks great, thanks! Is it worth putting in a PR for LCD clock to change it? |
This matches the behaviour of other clocks, meaning any dependencies between widgets and clock info is consistent See also espruino#2900
This matches the behaviour of other clocks, meaning any dependencies between widgets and clock info is consistent See also espruino#2900
This introduces a clockinfo for the recorder, to allow quick toggling of recording state.
Currently the pause icon is white (for a dark background) - I use
drawImage({ ..., palette })
to alter this based on theg.theme
, but I'd like the icon to highlight when the clock info is selected, like the step icon.I can't see how the step icon does it though - it's a fixed image, which apps then draw just by passing to
g.drawImage()
- does it work by something like the icon is 1-bit and sodrawImage
uses the background or foreground colour as its palette?