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

XSpinner Element missing arrows if non built-in fonts used #199

Closed
Pconti31 opened this issue Feb 25, 2020 · 3 comments
Closed

XSpinner Element missing arrows if non built-in fonts used #199

Pconti31 opened this issue Feb 25, 2020 · 3 comments
Assignees
Labels

Comments

@Pconti31
Copy link
Contributor

Describe the bug

If user request non-built-in font for the XSpinner element, boxes are shown not the up/down arrows.

Device hardware

All

Expected behavior

Suggest adding up/down character setting as part of API so user can change it.
Say by using '+' and '-' characters or whatever.

This was reported to me by G. Evangelista as a Builder issue.
spinner_err

@Pconti31
Copy link
Contributor Author

Pconti31 commented Mar 2, 2020

Cal:
I have attached a possible solution by adding a new API call to XSpinner
and tested by modifying ex32_bld_spinner to make the optional new call.
The normal built-in arrows '\30' and '\31' are used if no makes this call.
///
/// Set Up and Down characters for the Spinner element
/// - Called during redraw
///
/// \param[in] pvGui: Void ptr to GUI (typecast to gslc_tsGui*)
/// \param[in] pElemRef: ptr to ElementRef
/// \param[in] cIncrement: Character to use to indicate incrementing the spinner
/// \param[in] cDecrement: Character to use to indicate decrementing the spinner
///
/// \return true if success, false otherwise
///
bool gslc_ElemXSpinnerSetChars(void* pvGui,gslc_tsElemRef* pElemRef,uint8_t cIncr, uint8_t cDecr);

I have attached my new version of XSpinner
Paul--

XSpinner.zip

@ImpulseAdventure
Copy link
Owner

Paul - that sounds like a good solution. If you end up creating a PR, I can merge it. Otherwise I’ll take care of it when I return on the weekend. Thanks!

Pconti31 added a commit to Pconti31/GUIslice that referenced this issue Mar 3, 2020
ImpulseAdventure added a commit that referenced this issue Mar 3, 2020
issue #199 XSpinner support for optional up/down characters
@ImpulseAdventure
Copy link
Owner

Fixed and 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

2 participants