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

Create window with physical dimensions #615

Closed
spearman opened this issue Jul 28, 2018 · 4 comments
Closed

Create window with physical dimensions #615

spearman opened this issue Jul 28, 2018 · 4 comments
Labels
C - needs discussion Direction must be ironed out S - api Design and usability

Comments

@spearman
Copy link
Contributor

With the change to LogicalSize there's no way to create a window with desired physical dimensions without checking DPI and resizing after it's created.

@ghost
Copy link

ghost commented Aug 24, 2018

Is this what is causing my window to behave so strangely on my UHD screen? I always have to resize the window to get my conrod gui be resized accordingly, but ONLY on the uhd screen. The fhd is working just fine all the time :(

@francesca64 francesca64 added S - api Design and usability C - needs discussion Direction must be ironed out labels Nov 24, 2018
@francesca64
Copy link
Member

Sorry I never addressed this! There's already some discussion on this here: #591 (comment)

@AnneKitsune
Copy link

Here's a small piece of code I just wrote for amethyst which does just that.

let hidpi = self.events.get_primary_monitor().get_hidpi_factor();

if let Some(dimensions) = self.config.dimensions {
    wb = wb.with_dimensions(LogicalSize::from_physical(dimensions, hidpi));
}

get_primary_monitor() returns MonitorId.
wb is winit's WindowBuilder.

@Osspial
Copy link
Contributor

Osspial commented Apr 24, 2019

Closing in favor of #837

@Osspial Osspial closed this as completed Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C - needs discussion Direction must be ironed out S - api Design and usability
Development

No branches or pull requests

4 participants