Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI outline offset calculated incorrectly #10727

Closed
viridia opened this issue Nov 24, 2023 · 1 comment · Fixed by #10730
Closed

UI outline offset calculated incorrectly #10727

viridia opened this issue Nov 24, 2023 · 1 comment · Fixed by #10730
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy
Milestone

Comments

@viridia
Copy link
Contributor

viridia commented Nov 24, 2023

Bevy version

0.12.0

What you did

Setting Outline.offset has no effect - however setting Outline.width affects both offset and outline.

The 'outline_offset' appears to be using outline.width instead of outline.offset. You can see the code here:

node.outline_offset = outline

What went wrong

Looks like a simple typo. It should be using '.offset' instead of '.width'.

@viridia viridia added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Nov 24, 2023
@alice-i-cecile alice-i-cecile added D-Trivial Nice and easy! A great choice to get started with Bevy A-UI Graphical user interfaces, styles, layouts, and widgets and removed S-Needs-Triage This issue needs to be labelled labels Nov 24, 2023
@alice-i-cecile alice-i-cecile added this to the 0.13 milestone Nov 24, 2023
@ickshonpe
Copy link
Contributor

ickshonpe commented Nov 25, 2023

Argh so embarrassing to miss something stupid like this. I wrote a few implementations, a third party plugin, one for the border radius PR, and a few for experimental forks of 0.11 and 0.12 with lots of rendering changes, and only the one I upstreamed to Bevy has this bug. IIRC I just added some outlines to the borders example with offset and width set to 5 pixels, which worked of course, and assumed it was good 😓

github-merge-queue bot pushed a commit that referenced this issue Nov 25, 2023
# Objective

Resolves  #10727.

`outline.width` was being assigned to `node.outline_offset` instead of
`outline.offset`.

## Solution

Changed `.width` to `.offset` in line 413.
cart pushed a commit that referenced this issue Nov 30, 2023
# Objective

Resolves  #10727.

`outline.width` was being assigned to `node.outline_offset` instead of
`outline.offset`.

## Solution

Changed `.width` to `.offset` in line 413.
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-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants