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

Bevy 0.12 #118

Merged
merged 8 commits into from
Nov 10, 2023
Merged

Bevy 0.12 #118

merged 8 commits into from
Nov 10, 2023

Conversation

bytemunch
Copy link
Collaborator

closes #117

Bumps own version
Bumps bevy version
Bumps cosmic-text version (cos why not throw that in too lol, doesn't seem to be any breaking changes)

@Dimchikkk
Copy link
Owner

Main:
image

Current branch:
image

Text scaling looks broken on Retina.

@bytemunch
Copy link
Collaborator Author

bump lock

aaaaah no my noob is showing :')

Text scaling looks broken on Retina.

Gah I really need to get used to testing on HiDPI displays, my laptop has one. Investigating 🧐

@Dimchikkk
Copy link
Owner

also bumped wasm-bindgen = "0.2.88", so you have to run cargo install wasm-server-runner --force if previous version is installed.

@Dimchikkk
Copy link
Owner

Dimchikkk commented Nov 9, 2023

Gah I really need to get used to testing on HiDPI displays, my laptop has one. Investigating 🧐

It's interesting that if I move app from Mac Display to HP monitor and back - scaling is fine. So seems like only "initial" scaling is wrong.

@Dimchikkk
Copy link
Owner

Dimchikkk commented Nov 9, 2023

Hm, backspace doesn't work for me at all on this branch (tested on desktop target).

@bytemunch
Copy link
Collaborator Author

oh my life keeps getting in the way at the moment

yeah backspace was broken, seems like the editor action only being needed on wasm is gone now. so pushed for time today i only tested if it rendered, typed, ctrl-a'd and deleted my bad

doing wasm update and tests now hopefully will get something up and running soon

@Dimchikkk
Copy link
Owner

@bytemunch no hurry, life first <3

@bytemunch
Copy link
Collaborator Author

@StaffEngineer would appreciate a test, my screens only differ by 0.8 in scale factor and it's hard to tell by eye :)

@Dimchikkk
Copy link
Owner

Dimchikkk commented Nov 10, 2023

  1. Backspace started to work but the bug that it works also for readonly widgets is back.
  2. Bug with scaling for Mac Display is still there:

Before moving to non-mac display:
image
After moving to non-mac display and back:
image

@bytemunch
Copy link
Collaborator Author

Backspace bug fix just isn't merged in this branch. I'm kinda lost with the Retina things then, has the scale factor that a retina display gets changed between this branch and main?

@Dimchikkk
Copy link
Owner

main was fine, let me try to log scale value and get back to you :)

@Dimchikkk
Copy link
Owner

Dimchikkk commented Nov 10, 2023

@bytemunch wow, bevy's bug or even winit 😢

fn setup(mut commands: Commands, windows: Query<&Window, With<PrimaryWindow>>) {
    commands.spawn(Camera2dBundle::default());
    let primary_window = windows.single();
    dbg!("scale_factor: {}", primary_window.scale_factor());

prints 1 on bevy 0.12 and 2 on bevy 0.11 for Retina.

@bytemunch
Copy link
Collaborator Author

bytemunch commented Nov 10, 2023

Very strange, winit 0.28.7 should have fixed this not broken it.
bevyengine/bevy#9991 was merged because rust-windowing/winit#3118 allegedly fixed things.

Or maybe that's for actual resizing after further digging. Can't see anything in bevy that's changed scaling though?

@Dimchikkk
Copy link
Owner

Created a bug: bevyengine/bevy#10491

@bytemunch
Copy link
Collaborator Author

Ah yeah looks like we're getting scale factor before window exists? But should still fire WindowScaleFactorChanged event when it updates, which should make this problem disappear on it's own.

@Dimchikkk
Copy link
Owner

Dimchikkk commented Nov 10, 2023

Ah yeah looks like we're getting scale factor before window exists? But should still fire WindowScaleFactorChanged event when it updates, which should make this problem disappear on it's own.

Yeah, looks like this, but yeah WindowScaleFactorChanged is not fired.

@Dimchikkk
Copy link
Owner

@bytemunch I guess there should be the way to wait until window is created and then read scale factor once...

@Dimchikkk
Copy link
Owner

Dimchikkk commented Nov 10, 2023

Okay, the same issue was already reported by someone else... it's marked as the issue to fix for 0.12.1, so hopefully fix will come soonish :)

fix didnt work, no need to keep the over complicated function
@bytemunch bytemunch merged commit 77d2693 into main Nov 10, 2023
4 checks passed
@bytemunch bytemunch deleted the bevy_0.12 branch November 10, 2023 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bevy 0.12 support
2 participants