lamandi / brewtroller

Automatically exported from code.google.com/p/brewtroller
0 stars 0 forks source link

Preserve Scroll & Cursor Location during Toggle Value #33

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently options that toggle (for example, "On or Off" on hop schedule or "PID 
or On/Off" for Heat Output mode) cause the screen to redraw and the item jumps 
to the top (not noticible if the item being edited is the first item). This is 
a little jarring for the user (what happened?). It would be better if the 
scroll position and the cursor position was maintained so the user can 
immediately see that the value was toggled.

This might be in other places in the code, as well.

* Related - shouldn't the "Mash Liquor Heat Source" or "Heat Strike In" be 
reverted back to a toggle (vs. a menue)? or was the intention to allow a third 
option (boil kettle?) in the future?

Original issue reported on code.google.com by keith.mycek on 2 Sep 2010 at 7:36

GoogleCodeExporter commented 9 years ago

Original comment by shimodabt@gmail.com on 14 Sep 2010 at 9:55

GoogleCodeExporter commented 9 years ago
Fix in build 522. This is a modification with a wide impact. Modifications were 
around the scrollMenu function which is called frequently. I am quite satisfied 
with the tests but that does not mean that no side effect will be found. 

One the new behavior is that the previously selected item get refreshed and 
listed at the top of the menu when coming back from a lower lever menu. So, 
there is in some scenarios a scroll up effect. Will see if this is really 
anoying! I think we can live with that. 

Original comment by shimodabt@gmail.com on 15 Sep 2010 at 8:32

GoogleCodeExporter commented 9 years ago
Tested this in build 524, and it doesn't appear to be fixed, yet. 

To reproduce... 
1) edit a program
2) edit the hop additions
3) scroll the cursor down to the middle position (third line)
4) click the encoder to change the value

Expected result (assuming a fix):
Screen does not scroll, and value changes from On to Off, or Off to On

Actual result:
Screen redraws with selected item at position 1 (top), and value changed. The 
previous cursor position on line 2 is not preserved. 

Original comment by keith.mycek on 27 Sep 2010 at 10:48

GoogleCodeExporter commented 9 years ago
I'd like to suggest we fix this by implementing the Menu library throughout 
BrewTroller. The Menu library already keeps track of the cursor position as 
well as the current _topItem. By creating a menu object for each menu we can do 
alternate screen logic and then redraw the previous menu simply by calling 
scrollmenu again against the appropriate menu object.

Original comment by mattreba@gmail.com on 15 Jan 2011 at 3:47

GoogleCodeExporter commented 9 years ago

Original comment by mattreba@gmail.com on 26 Jan 2011 at 8:21

GoogleCodeExporter commented 9 years ago
Implemented via menu library in BT 2.3. 

Original comment by mattreba@gmail.com on 10 Feb 2011 at 3:22