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

fix(color): EditNumber class not implementing zeroText logic #4611

Merged
merged 1 commit into from
Feb 11, 2024

Conversation

frankiearzu
Copy link
Contributor

@frankiearzu frankiearzu commented Feb 6, 2024

For Color Radios, small display inconsistency/bug.

Class EditNumber has the option to replace a zero value for any other text. But was not working.
Looking at the code, there is no logic to handle the ZeroText.

NOTE: this fix is only for the main (2.10) branch.
On branch 2.9, this code is in basenumberedit (BaseNumberEdit class). Let me know if you want a PR specific for 2,9

Example Screen: Telemetry Sensor Edit, the Ratio should show "-" when 0, and is not. B&W radios works properly.

image
image
image

Example: Mixer Edit, Warning should show "Off" when zero.
image
image

Summary of changes:

Libopenui: numberedit (NumberEdit class): Added code to show the zeroText string if the value is 0.

According to the the reference, is only used in 4 pages:
image

@frankiearzu
Copy link
Contributor Author

frankiearzu commented Feb 7, 2024

After the fix.. Both matches now.

image
image

@pfeerick pfeerick changed the title GUI(color): EditNumber class not implementing zeroText logic fix(color): EditNumber class not implementing zeroText logic Feb 11, 2024
@pfeerick
Copy link
Member

Thanks for the screenshots showing before and after... makes sense, nice and consistent.

@pfeerick pfeerick merged commit 7c8c413 into EdgeTX:main Feb 11, 2024
43 checks passed
@pfeerick
Copy link
Member

2.9 equivalent pushed also if you want to sanity check it before 2.9.4 goes out the door ;)

@pfeerick pfeerick added this to the 2.9.4 milestone Feb 11, 2024
@pfeerick pfeerick added bug 🪲 Something isn't working color Related generally to color LCD radios labels Feb 11, 2024
philmoz pushed a commit to philmoz/edgetx that referenced this pull request Feb 11, 2024
philmoz pushed a commit to philmoz/edgetx that referenced this pull request Feb 12, 2024
@frankiearzu frankiearzu deleted the Color-NumberEdit-Fix branch February 15, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working color Related generally to color LCD radios
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants