Skip to content

Typify physical/logical position/sizes for windows #7099

Open
@Aceeri

Description

@Aceeri

What problem does this solve or what need does it fill?

It is easy to mix up physical and logical sizes/positions for windows which might cause subtle issues when scale factors are at play (whether overrides or native).

What solution would you like?

Create types for position/sizes respective to physical/logical spaces similar to winit's https://docs.rs/winit/0.27.5/winit/dpi/index.html#structs

What alternative(s) have you considered?

It might make sense to try to encapsulate physical position/size away from the user unless they really opt into it, so that everything in logical space. But I think doing both would be the best of both worlds here.

Additional context

Good reading on why scale factors matter:
https://docs.rs/winit/0.27.5/winit/dpi/index.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-WindowingPlatform-agnostic interface layer to run your app inC-Code-QualityA section of code that is hard to understand or changeC-UsabilityA targeted quality-of-life change that makes Bevy easier to use

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions