-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
lib/gui/lvgl: Add user config file #36479
lib/gui/lvgl: Add user config file #36479
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please amend commits instead of adding new ones for the changes.
Add custom preferences file, for example to enable custom fonts and change preferences. Signed-off-by: Krivorot Oleg [email protected]
b5ac2f8
to
19c431b
Compare
I'm sorry, I think I figured out how to change and not produce commits. This is my first pull request for a large project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same behavior can be achieved by setting Kconfig options in prj.conf
.
This is if you define the standard options in Kconfig. But there are options that need to be written in lv_config.h so that the lvgl library itself can use them. For example, I have not found any other way to completely replace the standard fonts and use several of my fonts in my theme. All of this is simply solved by including an additional header file at the end. |
There is no need to add an extra header for custom fonts. The auto-generated C font files can be added to the application ( |
I agree with the help of the specified definitions and the indication void * lv_theme_default_font_small_custom_ptr and others, I managed to connect my fonts.
but it fails to compile:
but if in lv_conf.h
everything compiles fine. There is a proposal to modify the connection of a custom theme |
and the custom theme through my proposal is connected as a hack, I do not type a custom theme and then redefined the variables :-( |
@oleg-krv you're right, the Kconfig custom options do not work (Kconfig options expand as a string). An issue should be opened to fix/remove that. What I've done for custom themes in the past is:
|
This can be done, but how to remove the initialization of the standard theme so that it does not take up memory? Alternative. Replace block:
to this code:
also a hack, but more elegant :-) |
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
Add custom preferences file, for example
to enable custom fonts and change preferences.
Signed-off-by: Krivorot Oleg [email protected]