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

Weather alert content can overfill the message box #66

Closed
neilswann80 opened this issue Nov 1, 2023 · 6 comments
Closed

Weather alert content can overfill the message box #66

neilswann80 opened this issue Nov 1, 2023 · 6 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@neilswann80
Copy link

I noticed a recent weather alert contained so much content it overfilled the message box so you are unable to see/read the beginning of the message.

As there is no option to scroll within a message, perhaps break the content into multiple pages based on a max number of lines?

@orontee
Copy link
Owner

orontee commented Nov 1, 2023

I noticed a recent weather alert contained so much content it overfilled the message box so you are unable to see/read the beginning of the message.

As there is no option to scroll within a message, perhaps break the content into multiple pages based on a max number of lines?

Alerts are currently shown through a call to the Dialog() function, https://github.com/orontee/taranis/blob/main/src/alerts.cc#L67. AFAICT this function doesn't support vertical scrolling.

The easiest solution is to elide the alert description after a fixed number of characters. Ugly. But other solutions look quite complicated to my eyes.

@orontee orontee added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Nov 1, 2023
@orontee
Copy link
Owner

orontee commented Nov 1, 2023

@neilswann80 Hey what was the location of that alert???

I just copy-pasted the lyrics of the song I was listening to in the first alert of my taranis.json file and with more or less 400 characters it looks ok!

screenshot

@neilswann80
Copy link
Author

Today's weather alert on Bristol, GB is an example of the overfill.

@orontee
Copy link
Owner

orontee commented Nov 2, 2023

Oh, I see...

screenshot

I'll investigate what scrollview.h in the SDK has to offer...

@orontee orontee added the bug Something isn't working label Nov 4, 2023
orontee added a commit that referenced this issue Nov 8, 2023
orontee added a commit that referenced this issue Nov 8, 2023
orontee added a commit that referenced this issue Nov 8, 2023
orontee added a commit that referenced this issue Nov 8, 2023
@orontee
Copy link
Owner

orontee commented Nov 8, 2023

First step: Implement an alert viewer.
Next step: Plug ScrollView in the alert viewer...
screenshot

orontee added a commit that referenced this issue Nov 8, 2023
orontee added a commit that referenced this issue Nov 8, 2023
orontee added a commit that referenced this issue Nov 13, 2023
orontee added a commit that referenced this issue Nov 13, 2023
orontee added a commit that referenced this issue Nov 13, 2023
@orontee
Copy link
Owner

orontee commented Nov 13, 2023

Implemented using AddScrolledArea/RemoveScrolledArea and consuming EVT_SCROLL. Not very smooth and missing a scroll bar but good enough for such a marginal case where the alert description would fill the entire screen...

orontee added a commit that referenced this issue Nov 13, 2023
@orontee orontee closed this as completed Nov 13, 2023
@orontee orontee added this to the Next release milestone Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants