bevy/release-content/migration-guides
robtfm b641aa0ecf
separate border colors (#18682)
# Objective

allow specifying the left/top/right/bottom border colors separately for
ui elements

fixes #14773

## Solution

- change `BorderColor` to 
```rs
pub struct BorderColor {
    pub left: Color,
    pub top: Color,
    pub right: Color,
    pub bottom: Color,
}
```
- generate one ui node per distinct border color, set flags for the
active borders
- render only the active borders

i chose to do this rather than adding multiple colors to the
ExtractedUiNode in order to minimize the impact for the common case
where all border colors are the same.

## Testing

modified the `borders` example to use separate colors:


![image](https://github.com/user-attachments/assets/5d9a4492-429a-4ee1-9656-215511886164)

the behaviour is a bit weird but it mirrors html/css border behaviour.

---

## Migration:

To keep the existing behaviour, just change `BorderColor(color)` into
`BorderColor::all(color)`.

---------

Co-authored-by: ickshonpe <david.curthoys@googlemail.com>
2025-05-26 16:57:13 +00:00
..
.gitkeep
anchor_is_removed_from_sprite.md Fix Anchor component inconsistancies (#18393) 2025-05-21 15:32:04 +00:00
entity_representation.md Make entity generation a new type and remove identifier (#19121) 2025-05-08 04:03:05 +00:00
generic-option-parameter.md Generic SystemParam impls for Option and Result (#18766) 2025-05-07 18:20:08 +00:00
interned-labels-cleanup.md Remove upcasting methods + Cleanup interned label code (#18984) 2025-05-26 15:38:12 +00:00
log-diagnostics-hash-set.md Expose LogDiagnosticsState (#19323) 2025-05-23 20:56:36 +00:00
merge_observerState_observer_single_component.md Merge ObserverState and Observer into single component (#18728) 2025-05-06 00:12:27 +00:00
observers_may_not_be_exclusive.md Prevent exclusive systems from being used as observers (#19033) 2025-05-05 17:46:25 +00:00
overflowclipbox_default_is_now_paddingbox.md
per-world-error-handler.md Per world error handler (#18810) 2025-05-19 01:35:07 +00:00
picking_location_not_component.md fix(picking): Location is not a Component anymore. (#19306) 2025-05-22 01:33:01 +00:00
remove_archetypecomponentid.md Stop using ArchetypeComponentId in the executor (#16885) 2025-05-05 22:52:44 +00:00
remove_deprecated_batch_spawning.md Remove insert_or_spawn function family (#18148) 2025-05-05 23:14:32 +00:00
rename_condition.md Rename Condition to SystemCondition` (#19328) 2025-05-22 15:50:19 +00:00
rename_spawn_gltf_material_name.md Add GltfMeshName component and Deref implementations (#19331) 2025-05-23 20:56:48 +00:00
rename_StateScoped.md Rename StateScoped to DespawnOnExitState and add DespawnOnEnterState (#18818) 2025-05-06 00:37:04 +00:00
separate-border-colors.md separate border colors (#18682) 2025-05-26 16:57:13 +00:00
simple_executor_going_away.md deprecate SimpleExecutor (#18753) 2025-05-06 00:21:57 +00:00
system_set_naming_convention.md Adopt consistent FooSystems naming convention for system sets (#18900) 2025-05-06 15:18:03 +00:00