A renaming of UI scale factors from names that imply a relationship to
monitor DPI to names that imply that they simply change "scale"
Pull Request: blender/blender#105750
Allow specifying a specific region to check for active button. This is
required in some circumstances, like Driver Popover.
Pull Request: blender/blender#105746
Don't allow the hover of mouse to auto-raise another window while you
are entering data into a text or number input.
Pull Request: blender/blender#105446
Add mouse hover highlighting for items in UILists, in both list mode
and preview tile mode.
See 104677 for more details
Differential Revision: blender/blender#104677
Reviewed by Brecht Van Lommel
The buttons of enum context menus are of type `UI_BUT_ROW`. They
are part of the set of buttons we create underline shortcuts for in
`ui_menu_block_set_keyaccels`.
But since they weren't handled in `ui_handle_button_activate_by_type`,
pressing the underline shortcuts didn't do anyting in those cases.
Co-authored-by: Leon Schittek <leon.schittek@gmx.net>
Co-authored-by: Brecht Van Lommel <brecht@noreply.localhost>
Pull Request #104433
No user-visible changes expected.
Essentially, this makes it possible to use C++ types like `std::function`
inside `uiBut`. This has plenty of benefits, for example this should help
significantly reducing unsafe `void *` use (since a `std::function` can hold
arbitrary data while preserving types).
----
I wanted to use a non-trivially-constructible C++ type (`std::function`) inside
`uiBut`. But this would mean we can't use `MEM_cnew()` like allocation anymore.
Rather than writing worse code, allow non-trivial construction for `uiBut`.
Member-initializing all members is annoying since there are so many, but rather
safe than sorry. As we use more C++ types (e.g. convert callbacks to use
`std::function`), this should become less since they initialize properly on
default construction.
Also use proper C++ inheritance for `uiBut` subtypes, the old way to allocate
based on size isn't working anymore.
Differential Revision: https://developer.blender.org/D17164
Reviewed by: Hans Goudey
Finding the active view item button should only happen when it's actually
necessary, since looping through all buttons and blocks is an expensive
operation. This patch limits the search a bit more, to left clicks (the only
case that is actually handled).
This improves drawing performance in the node editor slightly,
where this was a bottleneck.
Differential Revision: https://developer.blender.org/D16882
- Use typed enum for the wrap axis.
- Rename `bounds` to `wrap_region`.
- Take a `rcti` argument instead of an `int[4]`.
- Pair wrap & wrap_region arguments together.