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

Scale issue on iOS #419

Closed
johanholmerin opened this issue Jun 30, 2024 · 1 comment · Fixed by #421
Closed

Scale issue on iOS #419

johanholmerin opened this issue Jun 30, 2024 · 1 comment · Fixed by #421

Comments

@johanholmerin
Copy link
Contributor

I'm experiencing some rendering issues when running xilem on iOS. The content is stretched vertically compared to how it looks on android and macOS. The touch targets also differ from how the content is rendered so you have to tap above the buttons for them to work.

Repo: https://github.com/johanholmerin/xilem-cross-platform

iOS

xilem ios

android

xilem android

@DJMcNab
Copy link
Member

DJMcNab commented Jul 1, 2024

I believe that this issue is rust-windowing/winit#2308

I don't think we can do very much here - winit doesn't expose the correct APIs at the moment. If you can apply a targeted hack, I think we would probably land it, but we do not support iOS on anything other than a best-effort basis.

github-merge-queue bot pushed a commit that referenced this issue Jul 1, 2024
As I understand it, on iOS the outer_size corresponds to the size of the
window, meaning when the surface is rendered using inner_size(the
safe/non-obscured size) the elements get stretched.

There's an open issue in winit about clarifying/standardizing the
different sizes, but until that's done switching to outer_size fixes the
issue.

The touch positions now also match the rendering

Winit issue: rust-windowing/winit#2308

Fixes #419


<details>
  <summary>Before</summary>

![xilem
ios](https://github.com/linebender/xilem/assets/7433263/8bde0880-90e7-498b-b45c-c9964a0ae153)

</details>


<details>
  <summary>After</summary>

![ios
after](https://github.com/linebender/xilem/assets/7433263/8f6703d3-bb99-4f42-a941-d936ca5da6cf)


</details>
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 a pull request may close this issue.

2 participants