UI: Widen Search Boxes When Necessary #104603
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
FBX
Interest
Freestyle
Interest
Geometry Nodes
Interest
glTF
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#104603
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Harley/blender:SearchWidth"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Make floating search boxes wider when there is a linked scene or are
otherwise showing more information than a simple list.
This patch serves a similar purpose to this one by Phil Stopford https://archive.blender.org/developer/D16857
While that patch widened all search boxes, this one only does so when needed - the list has UI_MENU_ITEM_SEPARATOR_SHORTCUT or if any of the items have UI_BUT_HAS_SEP_CHAR. If either these is true then an amount is added to the width of
12 * data->fstyle.points * U.dpi_fac
The use of style.points is an accessibility issue in that it gains extra width than just the UI scale if the user has also increased the text style font points. This is done by some users with vision disabilities. Following shows a complaint about the search box by such a user (last image in comment): #86974 (comment)
Note that these search boxes are initiated in two different ways. One is from a menu item (the block will have UI_BLOCK_SEARCH_MENU), in which case the caller directly specifies the width at the call site. This patch does not change the width they are directly requesting.
The other way these searches are initiated is usually part of a larger UI item. In these cases the caller can not specify the width, it is just automatically the same width. It is for this type that this patch checks the type and content and makes it wider if needed.
This might look like a fair big change, but it is really just adding a
layout
callback to the region and then moving all the code to do with sizing into it.Following shows the change in size of two of these search boxes, as animated GIFs showing before and after:
Looks fine overall.
@ -742,0 +711,4 @@
UI_MENU_ITEM_SEPARATOR_SHORTCUT :
UI_MENU_ITEM_SEPARATOR_NONE;
if (separator_type == UI_MENU_ITEM_SEPARATOR_NONE && !data->preview) {
for (int a = 0; a < MIN2(data->items.totitem, 30); a++) {
I don't think we should limit this to 30. There's no particular reason to expect the user to need to select an item from the first 30 more often than the others.
1444b4918b
toa176ff2d11
@blender-bot build