-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
feat(color): allow all UI controls for widgets when full screen #5808
Conversation
731932e
to
8f861ec
Compare
9ef3bee
to
aa5a078
Compare
Many thanks for your great work! Most stuff was already discussed on discord. Just not to get lost I mention the following issues I actually see:
|
Slider and toggle switch fixed. A note on the lvgl.getContext() function. |
Confirm with my test app. Thanks!!!
Ok, maybe need only a docu fix then.
Cool, will also have a look at that. |
Added 'momentaryButton' control: {type="momentaryButton", text="Title", press=(function() end), release=(function() end)} Shows in checked state while pressed. |
Wow! Absolute great work. Many thanks. First tests are successful ;-) |
Just an idea for a small improvement (in my eyes): the UI classes That said, I would it find useful to override the default colors (from theme). The |
Great addition For ease of documentation, it will be better as buttonMomentarySo it will be sorted alphabetically (docs/web site/auto completion)Can the edgeTx used that button instead of the regular in the numbers editor (-10, -1, +1, +10)?—————————Offer ShmuelyOn 24 Jan 2025, at 16:58, Wilhelm ***@***.***> wrote:
Just an idea for a small improvement (in my eyes):
the UI classes button and momentaryButton share the same screen layout - they are visually indistinguishable. I would prefer to have different looks for them, to say: the momentaryButton should get another layout (maybe italic font or not a rounded rectangle).
That said, I would it find useful to override the default colors (from theme). The color property for e.g. button is ignored. Maybe there could be textColor, fgColor, bgColor that override the theme defaults.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@wimalopaan - the momentary button was your idea, do you have any preference for how it is named? Now would be the time to change it. |
@JimB40 - do you have any thoughts on this? |
I would still vote for |
8c192f2
to
0de975f
Compare
The |
Does this make sense? |
Since |
0de975f
to
08bd2a0
Compare
Not sure what you mean - widgets only get rotary encoder events when in full screen mode. |
Perfect, works as expected. |
Well, you have to move the event-location (finger) a certain amount before the slider follows to the new postion. Like the distance from the detent-position is a measure of the force that drags the slider (like a spring). But: no problem, was just an idea. |
Ok. |
Actually I get some problems when using two(!) instances of the same widget. After creating some UI pages the widgets stopped working correctly (e.g. button does not go into checked state) and the radio can't be switched off of model is still connected because the ENTER touch button does not work anymore. I'll have to dig deeper into the problem ... |
Using a DEBUG Build the problem has gone. But I see |
You can enable a debug function in lv_conf.h that shows which areas are redrawn. Maybe that helps debugging the high load |
Ok, thanks für the info. With a |
Can you share the script code please. |
The link to the widget: https://github.com/wimalopaan/LUA/tree/main/WIDGETS/lvglMultiSw Install 2 (or more) instances and alter the The make them fullscreen, go to settings page and edit e.g. a name. After that try to tap and check a button on the controls page. |
Tested in simulator and on TX16S and T15 radios and it works fine for me.
|
Did you test in a DEBUG build firmware?
Yes, and already fixed.
Thanks for reporting and testing. I had the problem on non-DEBUG TX16s and non-DEBUG X12s firmware, with DEBUG that never happens. |
In a debug build the LUA instruction limit is disabled, so the error can not happen. But in release build an error message should be displayed. |
Both radios were release builds. I selected a simple model with no other scripts. Set the view layout to 2x1 and added the widget into both spots, set addresses to 20 and 40. |
On my X12s the problem occurs in Release builds with two instances of this script and two other scripts. I think, I shall decompose the page construction into several steps to reduce the LUA instruction counter. |
I think this is a bug in the way the Lua instruction limit is being handled. Looking at it now. |
I've added a change for the instruction limit issue - can you see if it works better for you. |
Thanks again! (The only thing that reaches too high |
Do you see a chance to implement that? |
There are no multi tap events in lvgl so unlikely. It might be possible to add a long press callback for the slider; but I need to look at the event handler to see. |
Is this PR pretty much baked now? Anything major still outstanding? |
I think this is good to merge. If there are any more enhancements or bugs we can create a new PR. |
Absolutely! |
LGTM on TX16... will be great to see some new scripts using this. Thank you @wimalopaan for all your testing, and for the widget scripts you have worked on already making use of this :) |
I have to come back to this wonderful PR ;-) Actually I'm doing some more graphics intensive widgets: here, I like to draw some graphical primitives like rectangles and triangles and arcs with rapidly changing parameters. For the |
There is an open PR for Lua changes - #5926 |
Extends the Lua LVGL API to allow buttons, text and number edit, sliders etc to be used on widgets when the widget is in full screen mode.
Example widget script: