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
Bangle 1: E.showScroller() triangle drawn over top item #2153
Comments
Only if there are widgets right in the middle, which is reasonably rare since they grow out from either side. If you have suggestions for where to put the up arrow that'd be better I'm open to ideas :) |
Are they needed? I just compared a similar UI on the Pebble, which has a similar three-button hardware UI to the Bangle1. The way they handle a scroller is that they always try to keep the currently selected item in the center of the screen, with the other items above and below it. It's only when the selected item approaches either the top or bottom of the list that the drawing logic forces the highlight up or down as required to highlight the correct item, but also not allowing the top item to drop down and reveal empty space (and same for the bottom item - it doesn't shift up to the middle - the highlight moves down to the bottom of the screen). That way triangles aren't needed at all. |
Here is a demo you can copy-paste into the IDE. I've re-written the Bangle 1 (non-Q3) scroller to work in a Pebble-like fashion. Edit: changed to pass selection flag to draw function, and make selection box drawing optional - still backward compatible with existing code
|
Thanks - but I see this: So I'm not sure how it's apparent to the user that there are any items available after 'Item 8'? IIRC we never originally had up/down arrows for menus, but they were added at the request of users - so I'm not convinced that just removing them is suddenly going to be fine with those people that complained previously. You could always submit the change as an app and see how folks feel about it though: https://www.espruino.com/Bangle.js+Modification |
Just to add, maybe we can have the best of both worlds: What if the top item (Item 0) stays as Item 0 until the page scrolls, and then it turns into an up-arrow. Same with the bottom-most item |
It isn't immediately apparent that there is more than Item 8, that is true, but as soon as the user starts navigating down it will become apparent there are more options, then when they get to the end it is also obvious that they have reached the end. All I can say is that over the years I've been with the Pebble, I haven't found the lack of indication a problem, nor have I heard of such complaints. I'll have a fiddle with adding the triangles back... In the mean time, I've just edited my example code above to allow the draw function to know if it's drawing the selected item, and also to optionally inhibit drawing of the selection rectangle. That's mostly to match the Pebble appearance. The changes don't affect existing code conventions. |
Triangles, as requested :-) (edit: close drawPoly()s, edit2: add startidx, edit3: startidx->scroll)
|
Thanks! That looks good to me - it'd be nice to set and accept a Otherwise a PR would be great :) |
I could never work out what |
The issue is really that we want it to be compatible with code that also runs on Bangle.js 2 where it really is the amount of pixels scrolled - so adding a separately named item isn't helpful. The idea is if some app copies the scroll value and puts it back in when calling |
Thanks for explaining the |
Using the sample E.showscroller code from the documentation, when run on the Bangle.js 1 emulator the top triangle is drawn over the list items.
When I originally posted about this, Gordon suggested it was intended to work with widgets. It does look better with widgets enabled, but that would mean the triangle overdraws the widgets instead?
The text was updated successfully, but these errors were encountered: