Commit 5aefd57
authored
🤖 Make window size responsive to screen dimensions (#339)
Calculates window size as 80% of primary display dimensions instead of
using fixed 1600×1000 size.
Uses Electron's `screen.getPrimaryDisplay().workArea` to detect
available screen space (excluding taskbars/menubars), then sizes the
window to 80% of that space with a minimum floor of 1200×800 for smaller
displays.
**Examples:**
- 1920×1080 display → 1536×864 window
- 2560×1440 display → 2048×1152 window
- 3840×2160 display (4K) → 3072×1728 window
_Generated with `cmux`_1 parent 1dc11e6 commit 5aefd57
1 file changed
+18
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
7 | 15 | | |
8 | 16 | | |
9 | 17 | | |
| |||
314 | 322 | | |
315 | 323 | | |
316 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
317 | 332 | | |
318 | | - | |
319 | | - | |
| 333 | + | |
| 334 | + | |
320 | 335 | | |
321 | 336 | | |
322 | 337 | | |
| |||
0 commit comments