Skip to content
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

Text box background not restored when switching pages #202

Closed
rotus8 opened this issue Mar 2, 2020 · 4 comments
Closed

Text box background not restored when switching pages #202

rotus8 opened this issue Mar 2, 2020 · 4 comments
Labels

Comments

@rotus8
Copy link

rotus8 commented Mar 2, 2020

Describe the bug

When switching pages to a page with a text box, the text box background fill is not restored

Device hardware

Test Case:
textBoxTest1.zip

Load test case on hardware, display should come up with yellow text on a blue background and a LOG button. Pressing the LOG button takes you to a page with a text box. The text box should have a black background with yellow text. Pressing the TEXT button adds more text.

Pressing EXIT takes you back to the main screen. Pressing LOG again takes you to the log screen, but this time the text box has a blue background fill, with yellow/black text. Pressing TEXT adds a line of text, and restores the proper black background fill.

Additional info

Arduino 1.8.12
GuiSlice 0.13.0.19

@ImpulseAdventure
Copy link
Owner

Hi - Thanks for taking the time to create a testcase.

I am out of town at the moment so can’t run your test case, but perhaps you could try the following modification to your /src/elem/XTextbox.c file line 464 (Latest version on GitHub) and let me know if it works differently for you?
From:

if (pBox->nRedrawRow == XTEXTBOX_REDRAW_ALL) {

To:

if ((pBox->nRedrawRow == XTEXTBOX_REDRAW_ALL) ||  (eRedraw == GSLC_REDRAW_FULL)) {

@Pconti31
Copy link
Contributor

Pconti31 commented Mar 2, 2020

Calvin and Ted:
I tested Ted's sample with the code change Calvin recommended and it runs correctly.
I have attached the new version of XTextbox.c to save you the effort.
You just need to confirm things are working for you.

Paul--
XTextbox.zip

@rotus8
Copy link
Author

rotus8 commented Mar 2, 2020

Excellent. That fixed it.
Thanks!

Ted

@ImpulseAdventure
Copy link
Owner

Fix has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants