android, iOS: elegant keyboard re-sizing#4089
Conversation
| pub context: egui::Context, | ||
| pub raw_input: egui::RawInput, | ||
| pub screen: ScreenDescriptor, | ||
| pub bottom_inset: Option<u32>, |
There was a problem hiding this comment.
@ad-tra this would ideally live in WgpuWorkspace. I think it doesn't need to be an Option, it's default value is probably fine for it's non-existent state. Probably leave a lil comment explaining the overall strategy right here.
Not sure if it should be before or after the screen scaling math.
| right: 0.0, | ||
| top: 0.0, | ||
| bottom: self.renderer.bottom_inset.unwrap_or(0) as f32 | ||
| / self.renderer.screen.pixels_per_point, |
There was a problem hiding this comment.
I don't think this should happen here -- i think this should happen at integration time setting the inset. Apple reports these already in the right coordinate space, so I have to scale them up - only for this guy to scale them back down feels wrong.
There was a problem hiding this comment.
Fyi Android doesn't report them in the right scale
There was a problem hiding this comment.
yeah I figured looking at the code, so Ideally that adjustment happens in an android specific location
No description provided.