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

closing the main window change UI in the second window #13687

Closed
mockersf opened this issue Jun 5, 2024 · 2 comments · Fixed by #13697
Closed

closing the main window change UI in the second window #13687

mockersf opened this issue Jun 5, 2024 · 2 comments · Fixed by #13697
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior

Comments

@mockersf
Copy link
Member

mockersf commented Jun 5, 2024

Bevy version

main

What you did

  • launch the example multiple_windows
  • take note of the text in the second window
  • close the first window
  • check the text in the second window
second.mp4

What went wrong

text in the second window changed size and in content

@mockersf mockersf added C-Bug An unexpected or incorrect behavior A-Windowing Platform-agnostic interface layer to run your app in A-UI Graphical user interfaces, styles, layouts, and widgets labels Jun 5, 2024
@alice-i-cecile alice-i-cecile added the S-Needs-Investigation This issue requires detective work to figure out what's going wrong label Jun 5, 2024
@rparrett
Copy link
Contributor

rparrett commented Jun 5, 2024

Presumably, an incorrect scale factor is being applied. I can only reproduce at scale_factor != 1.0.

@mockersf
Copy link
Member Author

mockersf commented Jun 5, 2024

text rendering wasn't updated for #10559 so it's still using the primary window, and getting to default value if it can't find one

#13697 fixes that

@mockersf mockersf removed the S-Needs-Investigation This issue requires detective work to figure out what's going wrong label Jun 5, 2024
github-merge-queue bot pushed a commit that referenced this issue Jun 6, 2024
# Objective

- Fixes #13687 

## Solution

- Text rendering in UI is still dependent on the `PrimaryWIndow`
- implements #10559 for text rendering

There are other parts of UI that are still `PrimaryWindow` dependent, if
the changes here are OK I'll apply them everywhere.
I'm not a fan of the `EntityHashMap` here to hold the scale factors, but
it seems the quick and easy fix

## Testing

- Run example `multiple_windows` on a screen with a scale factor
different than 1, close the primary window
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 A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants