Improve modal_max_width sizes on large displays
Check for existing issues
- [X] Completed
Describe the feature
On a large display (my 4K display, at scaled resolution is about 3000px wide), the fixed size values cover a narrow variety of sizes, mostly learning towards "too big". Scaling the sizes relative to the screen width would help even the range out across a multitude of display sizes.
Current situation
To illustrate my situation, here are the calculated sizes for two screen sizes:
On a 3000px wide screen
| fixed | width | width/screen_width | |
|---|---|---|---|
| Medium | 1024px | 1976px | 0.65 |
| Large | 768px | 2232px | 0.75 |
| XLarge | 512px | 2488px | 0.83 |
On a 1440px wide screen
| fixed | width | width/screen_width | |
|---|---|---|---|
| Medium | 1024px | 416px | 0.28 |
| Large | 768px | 672px | 0.46 |
| XLarge | 512px | 928px | 0.64 |
The result in my case, with a 3000px wide screen, is that small is just a little too small, and medium is 3 times wider than small, so there is actually no reasonable "medium" for me.
Proposal
Even if the sizes were a simple fixed percentage clamped to the current minimum of 545px—(545 + screen_width * factor)—I think it would scale slightly better on larger displays and still be okay for smaller displays.
On a 3000px wide screen
| factor | width | width/screen_width | |
|---|---|---|---|
| Medium | 0.15 | 995px | 0.33 |
| Large | 0.30 | 1445px | 0.48 |
| XLarge | 0.45 | 1895px | 0.63 |
On a 1440px wide screen
| factor | width | width/screen_width | |
|---|---|---|---|
| Medium | 0.15 | 761px | 0.52 |
| Large | 0.30 | 977px | 0.67 |
| XLarge | 0.45 | 1193px | 0.82 |
Some other ideas (of debatable quality):
- Using ratio of 545px to the screen width as the basis for the scaling factor
- Scale the above scaling factor by the golden ratio for each size
Zed Version and System Specs
Zed: v0.168.2 (Zed) OS: macOS 15.1.1 Memory: 32 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help present your vision of the feature
No response
Agreed, using a ratio would be much better. Having the same issue on a 4K monitor where small is tiny and medium is huge.
Hey! I've opened https://github.com/zed-industries/zed/pull/31782 which fixed this :)