# windows: Properly handle \`DPI\` \(\#9456\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/086f4e63c5c2c7287e3322728d7d2f29386b7192)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 086f4e63c5c2c7287e3322728d7d2f29386b7192

Requested commit: 086f4e63c5c2c7287e3322728d7d2f29386b7192

Commit: 086f4e63c5c2c7287e3322728d7d2f29386b7192

Tree: e046a271fdab3f10b48d50a1a92092107228825b

Author: 张小白

Committer: GitHub

## Message

```
windows: Properly handle `DPI` (#9456)

As I mentioned before, there are the following issues with how GPUI
handles scale factors greater than 1.0:
1. The title bar buttons do not function correctly, with minimizing
button performing maximization and maximizing button performing closure.
2. As discussed in #8809, setting a scale factor greater than 1.0 causes
GPUI's drawing content to be pushed off the screen.

This PR introduces `LogicalSize` and `PhysicalSize` to differentiate
between coordinate systems for proper GPUI rendering, and now scale
factors above 1.5 are working correctly.

`Zed` with a scale factor equals 1.5, and change between different scale
factors:



https://github.com/zed-industries/zed/assets/14981363/3348536d-8bd3-41dd-82f6-052723312a5b



Release Notes:

- N/A
```

## Parents

- [2c36652be2d8ea6b68a3bb82f11fe96208444f0e](https://git.cafe/gitcafe/zed/commit/2c36652be2d8ea6b68a3bb82f11fe96208444f0e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/086f4e63c5c2c7287e3322728d7d2f29386b7192?format=markdown)
