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

[Merged by Bors] - Fix window centering when scale_factor is not 1.0 #5582

Closed

Conversation

rparrett
Copy link
Contributor

@rparrett rparrett commented Aug 5, 2022

Objective

Fixes #5581

Solution

Window::scale_factor already has logic for selecting the overridden or actual scale factor, so use it.

I tested this with the displays I have access to, but more testing would be nice. This seems like a pretty straightforward bug/fix though.

Changelog

Fixed

Fixed window centering on high-dpi displays.

@rparrett rparrett added the A-Windowing Platform-agnostic interface layer to run your app in label Aug 5, 2022
@mockersf mockersf added the C-Bug An unexpected or incorrect behavior label Aug 5, 2022
@Rigidity
Copy link

Rigidity commented Aug 5, 2022

Can confirm that this does solve the issue on MacOS M1 with Retina display.

@Weibye Weibye added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Aug 27, 2022
@mockersf
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Aug 30, 2022
# Objective

Fixes #5581

## Solution

`Window::scale_factor` already has logic for selecting the overridden or actual scale factor, so use it.

I tested this with the displays I have access to, but more testing would be nice. This seems like a pretty straightforward bug/fix though.

## Changelog

### Fixed

Fixed window centering on high-dpi displays.
@bors bors bot changed the title Fix window centering when scale_factor is not 1.0 [Merged by Bors] - Fix window centering when scale_factor is not 1.0 Aug 30, 2022
@bors bors bot closed this Aug 30, 2022
james7132 pushed a commit to james7132/bevy that referenced this pull request Oct 28, 2022
# Objective

Fixes bevyengine#5581

## Solution

`Window::scale_factor` already has logic for selecting the overridden or actual scale factor, so use it.

I tested this with the displays I have access to, but more testing would be nice. This seems like a pretty straightforward bug/fix though.

## Changelog

### Fixed

Fixed window centering on high-dpi displays.
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# Objective

Fixes bevyengine#5581

## Solution

`Window::scale_factor` already has logic for selecting the overridden or actual scale factor, so use it.

I tested this with the displays I have access to, but more testing would be nice. This seems like a pretty straightforward bug/fix though.

## Changelog

### Fixed

Fixed window centering on high-dpi displays.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WindowPosition::Centered doesn't work correctly when scale_factor is not 1.0
5 participants