-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
lcd.sizeText() is not accurate #5609
Comments
that is exactly the bug :-) |
First, not a bug since this is per design: it allows to concatenate text in efficient way, by giving a 'next' point given your current exact text, and a height that will allow this, or text to come to fit |
Ok, I like to build a dynamic widget, that will not assume any predefined size. |
Unlikely - text is fixed height in LVGL (which is used for both cases). There is no facility provided to get the pixel height of an individual character. |
tough one :-( |
I like the getTextSize to calculate the size based on the given text, and not on a text that maybe. |
Is there an existing issue for this problem?
What part of EdgeTX is the focus of this bug?
Transmitter firmware
Current Behavior
background:
I am trying to write a widget (re-write the BattAnalog), in a way that it will be fully adaptive to different widget zone
This way we could use it also in different TX resolutions
placing the text while trying to maximize the usage of the widget real estate is a hard task,
I am using the lcd.sizeText(), but it must be accurate to achieve a good results.
the issue:
lcd.sizeText() is too conservative, it take a lot of spares
Expected Behavior
lcd.sizeText() should return the exact size of the text given
Steps To Reproduce
sample widgets:
WIDGETS.ZIP
Version
2.10.4
Transmitter
RadioMaster TX16S / TX16SMK2
Operating System (OS)
Windows
OS Version
win11
Anything else?
No response
The text was updated successfully, but these errors were encountered: