Commit Graph

16 Commits

Author SHA1 Message Date
Harley Acheson
b8a81c90d1 Merge branch 'blender-v4.4-release' 2025-02-26 20:18:18 -08:00
Harley Acheson
89e78e7065 Fix: MacOS Status Status Bar Swap Areas Spacing
For MacOS, when hovering your mouse over the area corner "action zones"
the Status Bar shows a "Swap Areas" item that has unnecessary spacing
between the Control modifier key icon and left mouse button icon. This
is because I forget different icons were shown for Mac. This PR just
uses the proper calculated spacing that knows better.

Pull Request: https://projects.blender.org/blender/blender/pulls/135208
2025-02-27 05:13:09 +01:00
Harley Acheson
beaaa428e9 UI: Tightened Status Bar Spacing
Slight adjustments to the spacing of items on the Status Bar. Mainly
to reduce the distance between adjoining icons. Small decrease in space
between icon and text. Slight decrease in text size inside the event
icons. Proportionally wider gap between items.

Pull Request: https://projects.blender.org/blender/blender/pulls/134534
2025-02-15 00:57:49 +01:00
Hans Goudey
568c791e22 Cleanup: Use StringRef for uiBut tooltips
And replace nullptr arguments for tooltips in UI button
creation functions with std::nullopt. Though the distinction
between "no tooltip" and "empty tooltip" doesn't seem to exist,
it seems safer to keep the distinction since it existed with null before.
2025-02-14 15:12:48 -05:00
Guillermo Venegas
7682258ff9 Refactor: UI: Use a Vector to store buttons in UI blocks
This changes the ui-blocks buttons storage from Listbase to Vector.

Major changes that might cause a performance considerations are
in `ui_but_update_from_old_block` that requires to track buttons when restoring
button state between block redraws or in  `uiItemFullR` that may needs to insert
uiButs in the middle of the vector to add decorators. This might not be as fast as
removing or inserting elements in the middle of a listbase container. Also buttons currently
don't know its position in the container, so to get the previous and next
button its required to make a lookup of the button in the container.

`UI_block_update_from_old> ui_but_update_from_old_block` restores the state
of buttons between frames, this is done by sequentially testing if a button is the
same as an old button, however since UI can be created procedurally some old buttons
may not be drawn while editing other button data, this requires an extra track of what
buttons may not match to a new button while comparing for restoring state, but still
this buttons may be candidates to match to an new button.

Not functional changes expected.
Ref: #117604

Co-authored-by: Julian Eisel <julian@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/127128
2025-02-14 15:29:26 +01:00
Brecht Van Lommel
c7a33a62a2 Cleanup: Directly include DNA_userdef_types.h and BLI_listbase.h
Instead of relying on them being included indirectly.

Pull Request: https://projects.blender.org/blender/blender/pulls/134406
2025-02-12 23:01:08 +01:00
Harley Acheson
5956752eb7 UI: Themeable RedAlert, Error, Warning, Info Colors
The "Red Alert" color is currently hard-coded, which causes problems in
themes.  It also has an Enum value of 0, which precludes using this
value as "unset". We also use Error, Warning, and Info colors that are
part of the Info Editor.  This PR moves these out of the Info Editor
and into the "State" part of the theme. And then makes TH_REDALERT use
the TH_ERROR color.

Pull Request: https://projects.blender.org/blender/blender/pulls/131127
2025-02-12 20:59:47 +01:00
Brecht Van Lommel
3725fad82f Cleanup: Various clang-tidy warnings in editors
Pull Request: https://projects.blender.org/blender/blender/pulls/133734
2025-01-31 17:03:17 +01:00
Harley Acheson
224dffc41b UI: Corrections for Object Scale Warnings
Small changes to the status bar display when the active object has non-
uniform or negative scale. Use CTX_data_active_object rather than
BKE_view_layer_active_object_get. Case correction for a text string.
Small spacing change. Improved comments.

Pull Request: https://projects.blender.org/blender/blender/pulls/133834
2025-01-30 20:10:22 +01:00
Harley Acheson
06a43d7d99 UI: Object Scale Warnings
Show warnings on the status bar during idle time (not running any
operators) when the active object has non-uniform or negative scale.

Pull Request: https://projects.blender.org/blender/blender/pulls/132969
2025-01-30 18:09:46 +01:00
Harley Acheson
d62c143ab7 Refactor: Separated Functions from uiTemplateInputStatus
Just separating out two blocks of code into separate functions to make
it more readable. No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/133785
2025-01-30 00:31:27 +01:00
Harley Acheson
b34c135c30 UI: Status Bar Display Improvements For Regions
PR #133601 exposes some holes in the Status Bar display. Currently you
can see keymap entries for other areas, like 3D View, when hovering in
the Top Bar.  Or see the wrong items when hovering in a non-region
portions of an area. Or see keymap entries for window regions while
hovering headers. This PR fixes all these things.

Pull Request: https://projects.blender.org/blender/blender/pulls/133620
2025-01-26 21:26:44 +01:00
Harley Acheson
b58ff3484f Fix #133550: Status Bar Display at Window Edges
When your mouse is hovering in the gaps between editors the Status Bar
indicates that you can resize and bring up context options. This same
gap is also along the outside window edges even though not visible and
so shows these options when not applicable. This PR carefully shows the
actual area options right up to the edge instead. And also does not
show "Resize" for the gap between global areas and the rest.

Pull Request: https://projects.blender.org/blender/blender/pulls/133601
2025-01-26 03:45:44 +01:00
Hans Goudey
c6f5c44350 Cleanup: Remove unused includes in editors modules
Pull Request: https://projects.blender.org/blender/blender/pulls/133166
2025-01-16 23:17:51 +01:00
Campbell Barton
61a2f7a431 Cleanup: resolve check_spelling & check_licenses warnings 2025-01-08 11:31:43 +11:00
Jonas Holzman
8a855f9cbd UI: Refactor templates into individual files
This PR refactors each UI template into its own `interface_template_*.cc`
file.

* Added `interface_templates_intern.hh` which exposes shared utility
  functions and macros.
* Doxygen comment sections that were redundant of the file name were
  removed. If they contained additional description, they were added
  to the file Doxygen `\file` header.
* Short templates that were closely related were kept together in single
  files (e.g `uiTemplateHistogram`, `uiTemplateWaveform` and
  `uiTemplateVectorScope` are all in `interface_template_scopes.cc`).
  In this case, Doxygen comment section were preserved.

The only things remaining in `interface_templates.cc` are:
* Common utility function exposed by `interface_templates_intern.hh`
* Small independent templates (`uiTemplatePathBuilder`,
  `uiTemplateNodeSocket` and `uiTemplateFileSelectPath`)

Ref: https://projects.blender.org/blender/blender/issues/117604
Pull Request: https://projects.blender.org/blender/blender/pulls/132468
2025-01-07 16:21:07 +01:00