-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Text poistion in lv_ta #38
Comments
It really doesn't work properly. I will fix it on Monday. Until that please try this: vpad and hpad now do not affect the scrollbar position but it is a good idea to do that! |
Now the label's position should be affected by hpad and vpad. How do you imagine the scrollbar and hpad/vpad relationship? |
No problem.
Sorry, I'm not familiar with them. I guess it can change hpad/vpad to adjust the position of scrollbar. |
I'm happy that it's working! :) I will figure out something for scrollbar. |
In beta scrollbar positions are affected by Like this: static lv_style_t sb_style;
lv_style_copy(&sb_style, &lv_style_plain_color);
sb_style.body.padding.hor = -15;
sb_style.body.padding.ver = 15;
lv_obj_t *page = lv_page_create(lv_scr_act(), NULL);
lv_page_set_style(page, LV_PAGE_STYLE_SB, &sb_style);
lv_page_set_sb_mode(page, LV_SB_MODE_ON);
lv_page_set_scrl_fit(page, true, true);
lv_obj_set_size_scale(page, 100, 200);
lv_obj_set_pos_scale(page, 10, 10);
lv_obj_t *label = lv_label_create(page, NULL);
lv_label_set_text(label, "long long lines\n\n"
"to shows the\n\n"
"scrollbars'\n\n"
"position.\n\n"
"Some dummy text\n\n"
"Some dummy text\n\n"
"Some dummy text\n\n"); |
Added in v5.0.0 |
Remove taskYIELD() Calls and fix Kconfig slightly
I have a question. If I would like to adjust the position of text in
lv_ta
, whichvpad
andhpad
should I take?lv_ta
style_sb
fromlv_page_get_style_sb(ta)
I made some try. I use ptask to change vpad periodically.
I set
vpad
on style oflv_ta
, it worked on the first time calllv_obj_set_style(ta, &ta_style)
, but it didn't work on the second time or set style to the other newlv_style_t
.About
style_sb
, It's no effect by changing itsvpad
.Thanks!
The text was updated successfully, but these errors were encountered: