Comments (6)
It can't show label: "ABC abc xyz 123456 ght ijk" and button.
from lvgl.
my ui code:
static lv_style_t style_btn;
lv_style_init(&style_btn);
lv_style_set_radius(&style_btn, 5);
lv_style_set_border_color(&style_btn, lv_color_black());
lv_style_set_border_width(&style_btn, 1);
lv_style_set_text_color(&style_btn, lv_color_black());
lv_obj_t *label1 = lv_label_create(lv_scr_act());
// lv_label_set_long_mode(label1, LV_LABEL_LONG_WRAP); /*Break the long lines*/
// lv_obj_set_width(label1, 127); /*Set smaller width to make the lines wrap*/
// lv_obj_set_style_text_align(label1, LV_TEXT_ALIGN_CENTER, 0);
lv_label_set_text(label1, "ABC abc xyz 123456 ght ijk");
lv_obj_set_pos(label1, 0, 0);
// Create button
lv_obj_t *btn = lv_btn_create(lv_scr_act());
lv_obj_set_pos(btn, 20, 20);
lv_obj_set_size(btn, 50, 20);
lv_obj_t *label = lv_label_create(btn);
lv_label_set_text(label, "Button");
lv_obj_center(label);
lv_obj_add_style(btn, &style_btn, 0);
from lvgl.
// lv_conf.h
#define LV_COLOR_DEPTH 1
/*Swap the 2 bytes of RGB565 color. Useful if the display has an 8-bit interface (e.g. SPI)*/
#define LV_COLOR_16_SWAP 0
/*Enable features to draw on transparent background.
*It's required if opa, and transform_* style properties are used.
*Can be also used if the UI is above another layer, e.g. an OSD menu or video player.*/
#define LV_COLOR_SCREEN_TRANSP 0
from lvgl.
Note that with LV_COLOR_DEPTH 1 LVGL still renderers in 1 byte/px and not 1bit/px. Do you might need to convert rendered image.
from lvgl.
We need some feedback on this issue.
Now we mark this as "stale" because there was no activity here for 14 days.
Remove the "stale" label or comment else this will be closed in 7 days.
from lvgl.
As there was no activity here for a while we close this issue. But don't worry, the conversation is still here and you can get back to it at any time.
So feel free to comment if you have remarks or ideas on this topic.
from lvgl.
Related Issues (20)
- Roller Not Sending Value Changed Event When Setting The Index From Code HOT 3
- Add `LV_OBJ_CLASS_GROUP_DEF_TRUE` to the Arc object so it can be used with rotary encoder indevs HOT 1
- Lottie animation freezes when size changed HOT 2
- Use Arm2D with LLVM HOT 8
- coding style check on github is different from the one on the master branch HOT 1
- After merging #6068, the font converter produced erroneous files. HOT 2
- Can we add image pre caching function in lvgl HOT 3
- How to use private headers HOT 9
- Let the user change long_press_time easily HOT 4
- GESTURE bug HOT 4
- Add a define to lv_conf.h to skip SD Card initialization HOT 1
- Is there any official obj can be easy to Reflects the state of the hardware?
- NEON sw/blend assembler generates superfluous symbols HOT 2
- How to use LV_EVENT_DRAW_TASK_ADDED to refactor the text for scale? HOT 2
- LVGL and STM32 Integration Issue HOT 1
- Version V9.1, RLE decompression error occurred. HOT 5
- Kconfig file format error?
- Roller Crashes If Only Given One String HOT 1
- LV_MEM_SIZE Optimum Value HOT 1
- Cannot disable build of demos, examples and thorvg HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lvgl.