SIGN IN SIGN UP
bevyengine / bevy UNCLAIMED

A refreshingly simple data-driven game engine built in Rust

0 0 59 Rust

`impl Default` for `Outline` (#24196)

# Objective

`Outline` derives `Default` which means that outlines added to a UI node
aren't visible unless you set an explicit width. Generally, if you don't
want `Outline`s to be visible it's better to either set their `color` to
`Color::NONE` or remove the `Outline` component completely, not change
the width. `Outline`s are often used during debugging, and it's very
easy to leave the width unset and convince yourself the missing outline
is due to a bug.

## Solution

Remove the `Default` derive, and add an explicit `impl Default` with
`width` set to `Val::Px(1.)`.
I
ickshonpe committed
7a5f123cd796c3ade0a510aa910f7ebbcf6f8085
Parent: 60613e3
Committed by GitHub <noreply@github.com> on 5/8/2026, 1:24:38 PM