Skip to content

impl Default for Outline#24196

Merged
alice-i-cecile merged 2 commits into
bevyengine:mainfrom
ickshonpe:outline-default
May 8, 2026
Merged

impl Default for Outline#24196
alice-i-cecile merged 2 commits into
bevyengine:mainfrom
ickshonpe:outline-default

Conversation

@ickshonpe
Copy link
Copy Markdown
Contributor

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 Outlines to be visible it's better to either set their color to Color::NONE or remove the Outline component completely, not change the width. Outlines 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.).

…ode aren't visible unless set an explicit width. Generally, if you don't want `Outline`s to be visible you either set their `color` to `Color::NONE` or remove the `Outline` component completely. `Outline`s are often used during debugging, and it's very easy to leave the width unset and convince yourself the missing outline is because of a bug.

This PR removes the `Default` derive, and adds an explicit `impl Default` with the width set to 1 pixel.
@ickshonpe ickshonpe added D-Trivial Nice and easy! A great choice to get started with Bevy A-UI Graphical user interfaces, styles, layouts, and widgets labels May 8, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in UI May 8, 2026
@ickshonpe ickshonpe added S-Needs-Review Needs reviewer attention (from anyone!) to move forward C-Usability A targeted quality-of-life change that makes Bevy easier to use labels May 8, 2026
@ickshonpe ickshonpe added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 8, 2026
@alice-i-cecile alice-i-cecile added this pull request to the merge queue May 8, 2026
Merged via the queue into bevyengine:main with commit 7a5f123 May 8, 2026
40 checks passed
@github-project-automation github-project-automation Bot moved this from Needs SME Triage to Done in UI May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-UI Graphical user interfaces, styles, layouts, and widgets C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants