There are now a confusing range of ways to seemingly align my button text to force it to the left of the button. However none of these lines moved the text, it was still too far to the right and truncating.
Any suggestions please as to how to get this text aligned left and actually work ? Thanks
Version 7 was great and intuitive to use, so far I am having lots of problems with version 8.
Hello Jojo
Thanks for taking the time to reply. I think I have now figured out now why the text string fitted perfectly on V7 and is now screwed up on V8.
Firstly,
lv_obj_set_style_text_align(label, LV_TEXT_ALIGN_LEFT, 0); doesnt seem to do anything for me on V8 so I abandoned that. However
lv_obj_align(label, LV_ALIGN_LEFT_MID, 0, 0) does work and left justifies the label text.
The reason why I initially thought it wasnt working was due to the fact I have got quite a small button area where i am fitting the text into. For V7 it defaults to fitting it in perfectly with just a few blank pixels either side. When I use V8 and specify LV_ALIGN_LEFT_MID, surprisingly the text comes out positioned farther to the right than the default behavior in V7 and loses 2 characters. No wonder I was confused by it. Now I understand whats going on, I can workaround the problem in V8 by using something like lv_obj_align(label, LV_ALIGN_LEFT_MID, -15, 0); and tweaking the Xoffs.
Having subtle pixel accuracy changes going from V7 to V8 is horrible, must be a nightmare if you are trying to convert a big complex App.
Thanks for the extra idea, for completeness I just tried your suggested padding line. Unfortunately that doesnt fix it. The fix is to left justify and then add a further X offset by -12 pixels to get back to exactly what V7 did.
lv_obj_align(label2, LV_ALIGN_LEFT_MID, -12, 0);