Skip to content

[Merged by Bors] - Fix clipping in UI#6351

Closed
mockersf wants to merge 2 commits intobevyengine:mainfrom
mockersf:fix-scrolling
Closed

[Merged by Bors] - Fix clipping in UI#6351
mockersf wants to merge 2 commits intobevyengine:mainfrom
mockersf:fix-scrolling

Conversation

@mockersf
Copy link
Member

Objective

Solution

No more funkiness! 😞

Screenshot 2022-10-23 at 22 44 18

@mockersf mockersf changed the title Fix the clipping Fix clipping in UI Oct 23, 2022
@mockersf mockersf added C-Bug An unexpected or incorrect behavior A-UI Graphical user interfaces, styles, layouts, and widgets labels Oct 23, 2022
@mockersf mockersf added this to the Bevy 0.9 milestone Oct 23, 2022
Copy link
Contributor

@rparrett rparrett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was playing around with fixing this before I took off for the weekend, and this looks correct to me.

Tested with various scale factor overrides.

Copy link
Contributor

@ickk ickk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good to me

@mockersf mockersf added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Oct 24, 2022
@alice-i-cecile
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Oct 24, 2022
# Objective

- Clipping (visible in the UI example with text scrolling) is funky 
- Fixes #6287 

## Solution

- Fix UV calculation:
  - correct order for values (issue introduced in #6000)

  - add the `y` values instead of subtracting them now that vertical order is reversed
  - take scale factor into account (bug already present before reversing the order)
- While around clipping, I changed clip to only mutate when changed

No more funkiness! 😞 

<img width="696" alt="Screenshot 2022-10-23 at 22 44 18" src="https://user-images.githubusercontent.com/8672791/197417721-30ad4150-5264-427f-ac82-e5265c1fb3a9.png">
@bors bors bot changed the title Fix clipping in UI [Merged by Bors] - Fix clipping in UI Oct 24, 2022
@bors bors bot closed this Oct 24, 2022
james7132 pushed a commit to james7132/bevy that referenced this pull request Oct 28, 2022
# Objective

- Clipping (visible in the UI example with text scrolling) is funky 
- Fixes bevyengine#6287 

## Solution

- Fix UV calculation:
  - correct order for values (issue introduced in bevyengine#6000)

  - add the `y` values instead of subtracting them now that vertical order is reversed
  - take scale factor into account (bug already present before reversing the order)
- While around clipping, I changed clip to only mutate when changed

No more funkiness! 😞 

<img width="696" alt="Screenshot 2022-10-23 at 22 44 18" src="https://user-images.githubusercontent.com/8672791/197417721-30ad4150-5264-427f-ac82-e5265c1fb3a9.png">
Pietrek14 pushed a commit to Pietrek14/bevy that referenced this pull request Dec 17, 2022
# Objective

- Clipping (visible in the UI example with text scrolling) is funky 
- Fixes bevyengine#6287 

## Solution

- Fix UV calculation:
  - correct order for values (issue introduced in bevyengine#6000)

  - add the `y` values instead of subtracting them now that vertical order is reversed
  - take scale factor into account (bug already present before reversing the order)
- While around clipping, I changed clip to only mutate when changed

No more funkiness! 😞 

<img width="696" alt="Screenshot 2022-10-23 at 22 44 18" src="https://user-images.githubusercontent.com/8672791/197417721-30ad4150-5264-427f-ac82-e5265c1fb3a9.png">
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# Objective

- Clipping (visible in the UI example with text scrolling) is funky 
- Fixes bevyengine#6287 

## Solution

- Fix UV calculation:
  - correct order for values (issue introduced in bevyengine#6000)

  - add the `y` values instead of subtracting them now that vertical order is reversed
  - take scale factor into account (bug already present before reversing the order)
- While around clipping, I changed clip to only mutate when changed

No more funkiness! 😞 

<img width="696" alt="Screenshot 2022-10-23 at 22 44 18" src="https://user-images.githubusercontent.com/8672791/197417721-30ad4150-5264-427f-ac82-e5265c1fb3a9.png">
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 S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ui scroll behaviour is funky

4 participants