diff options
author | Julian Eisel <julian@blender.org> | 2021-03-18 17:00:55 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-03-18 17:09:31 +0300 |
commit | 2dd040a3495309566d6b2582e264b281752bcdd5 (patch) | |
tree | 46172bfc5d549bc6ab36d3ddfe98fea527ca550d /source/blender/windowmanager/WM_types.h | |
parent | 248d9809cabe483049fdc50f777a540180b4635b (diff) |
UI: Dynamically increase data-block name button size if there's space
Data-block selectors (or other selectors using the
`UILayout.teamplate_search` or `UILayout.template_search_preview`)
in headers used a fixed size width for the name button. Often that meant
the text would be clipped to fit even though there was plenty of
whitespace surrounding the data-block selector.
Now the name button can increase in width with the contained string,
clamped to some arbitrary and quite big maximum (3 times the minimum
width).
We could further take the available space into account, to reduce the
need for scrolling in the header. But I don't think that is much of an
issue and the name clipping it would re-introduce would probably be more
annoying.
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
0 files changed, 0 insertions, 0 deletions