Skip to content

Commit

Permalink
windows: Properly handle DPI (#9456)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
JunkuiZhang authored Mar 19, 2024
1 parent 2c36652 commit 086f4e6
Showing 1 changed file with 139 additions and 80 deletions.
Loading

0 comments on commit 086f4e6

Please sign in to comment.