Widening pop-ups - how to proceed?

I have become quite frustrated by the fixed width menus in the blender UI. In moderately complex scenes using linked scenes, the pop-up struggles to provide the full property name and also the linked scene name). I wondered if there might be a way to address this, and where this might lie in the code base. Does this need to be addressed on a case-by-case basis?



Digging around, I found this line :

uiItemR(row, &strip_ptr, "action", 0, NULL, ICON_ACTION);

in nla_buttons.c. I am still chasing this down. It’s all rather less than obvious at the moment.

I naively thought this would make a difference, but it doesn’t seem to:

uiItemR(row, &strip_ptr, "action", UI_ITEM_R_EXPAND, NULL, ICON_ACTION);

I haven’t been able to pin down the sequence of events that gives rise to the pop-up action menu when clicking the actions button. I am missing something here with how that “action” thing is handled.

With some help on blender.chat, it looks like the width is coming from UI_searchbox_size_x() as:

const int searchbox_width = UI_searchbox_size_x();

within ui_searchbox_create_generic_ex

This generic path seems to be confirmed with a breakpoint that shows a call sequence:


I’m thus uncertain how to change this without impacting all other generic users. Most of what I can find for similar sites making use of UI_searchbox_size_x() show seemingly arbitrary factors to multiply the value, with little visible explanation as to the values chosen, and no obvious consistency in the scaling factor applied.

Is it problematic to add a similar generic factor here, or would a change to widen this menu/pop-up need to involve refactoring away from this generic code path (which I would not know how to undertake)?

Differential at ⚙ D16857 Widen the NLA action drop-down menu

1 Like

I’ve made some additional forays, but run into some obstacles. I’m hoping a kind soul will provide some guidance : ⚙ D16857 Widen the NLA action drop-down menu

Still hoping for some guidance on this. I don’t see how to move forward, or an alternate approach.

I’m not good at programming but I thought I’d attempt to offer a TINY bit of help. It seems you currently want to know the proper way to get uiSearchItems instances into functions like ui_searchbox_create_generic_ex() . The following MAY be useful to give you some clues about how to proceed. :crossed_fingers:

After a minimal look I saw a function in file interface_region_search.cc called ui_but_search_refresh() . Well, uiSearchItems * items actually gets memory allocated for it WITHIN that function and then partially filled out and then I think the items instance gets filled out after being passed to ui_searchbox_update_fn() .

Also, the function UI_search_item_add() seems to be pretty important to filling out uiSearchItems . I think attribute_search_item_add() might also be worth investigating.