Add #define to control the tavbiew button width when buttons are on the left or right side

I love the tabview. But when I have the tabview with the buttons on the left side. the button text is vertical by define and I understand. But I would like the text to print horizontally. Because I have space on the screen and it also makes the buttons larger and easier to press.

Make I suggest a simple solution to add to the code to tabview
static void refr_btns_size(lv_obj_t * tabview) routine.
Add a #define that can be over written by the developer when compiling.

#define TABVIEW_SIDE_BUTTON_WIDTH 4

or

this would eliminate the requirement of having this #define defined to compile
#define TABVIEW_SIDE_BUTTON_WIDTH * 4

// mikes hack to get the button wider

case LV_TABVIEW_TAB_POS_LEFT:
case LV_TABVIEW_TAB_POS_RIGHT:
lv_obj_set_hidden(ext->btns, false);
btns_w = (lv_font_get_glyph_width(font, ‘A’, ‘\0’) * TABVIEW_SIDE_BUTTON_WIDTH ) + tab_left + tab_right + tab_bg_left + tab_bg_right;
btns_h = lv_obj_get_height(tabview);
break;

I have try this and it is working for me. It would be nice if it were added to the code base.
Thanks

Hi,

I’m ok with of having a define like this in lv_conf.h. Can you send a PR?

Thanks I will try the PR. Do you have link to start with?

Which way would you like it with the #define required to build or not required?

Pull Request. I got that.

I read your suggestion to add the padding to the button width. That works fine for me. No need to change anything.

thanks

It’s even better. :slight_smile:

Thank you anyway!