Commit 81f9a56
committed
Adapt size of Windows with default size upon zoom change
When moved between monitors of different zoom, Windows may not show
their full contents anymore. This is caused by their shell and the used
fonts being linearly scaled in size according to the zoom, even though
font size and required area for a font of a size are not linearly
related. I.e., a font of double the size required more than double of
the width and height.
Since there are many ways to customize Windows and their sizes/layouts
during and after initialization, it's difficult to solve that problem in
general. It is, however, most severe for Windows that use the default
calculated size and are not resizable, as those Windows not have
sophisticated layouts that adapt to the limited space and may easily
lead to cut offs the user cannot work around by resizing.
Thus, this change adds according zoom change and resize listeners to
identify if a Window uses the default computed size and, in that case,
recomputes it upon zoom change.1 parent 8ff6a17 commit 81f9a56
1 file changed
Lines changed: 48 additions & 0 deletions
Lines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
433 | 434 | | |
434 | 435 | | |
435 | 436 | | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
436 | 484 | | |
437 | 485 | | |
438 | 486 | | |
| |||
0 commit comments